traxxx-web/pages/auth/keys/+onBeforeRender.js

15 lines
246 B
JavaScript
Raw Permalink Normal View History

2024-08-31 02:59:05 +00:00
import { fetchUserKeys } from '#/src/auth.js';
export async function onBeforeRender(pageContext) {
const keys = await fetchUserKeys(pageContext.user);
return {
pageContext: {
title: 'API keys',
pageProps: {
keys,
},
},
};
}