this still breaks useFetch as the route returns null
@ -90,5 +90,5 @@ export default defineNuxtConfig({
},
alias: {
'#db': fileURLToPath(new URL('./server/database/', import.meta.url)),
}
})
});
@ -3,7 +3,7 @@ export default defineEventHandler(async (event) => {
if (!session.data.userId) {
// not logged in
return {};
return null;
const user = await Database.users.get(session.data.userId);