Cache session data

The session is always explicitly updated when it changes, cache it on
the client if it has already been loaded.
This commit is contained in:
Hornwitser 2025-03-08 00:34:46 +01:00
parent ed74f4bb0e
commit 2897542823

View file

@ -2,5 +2,8 @@ export const useAccountSession = () => useFetch(
"/api/auth/session",
{
transform: (input) => input === undefined ? false : input,
getCachedData(key, nuxtApp) {
return nuxtApp.payload.data[key];
},
}
);