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

15 lines
246 B
JavaScript

import { fetchUserKeys } from '#/src/auth.js';
export async function onBeforeRender(pageContext) {
const keys = await fetchUserKeys(pageContext.user);
return {
pageContext: {
title: 'API keys',
pageProps: {
keys,
},
},
};
}