Add secrets configuration to wrangler.jsonc and improve null checks in layout component
This commit is contained in:
@@ -101,7 +101,7 @@
|
||||
$effect(() => {
|
||||
// this means the session cookie 'classroomio.session_data' expired and we need to trigger a new session
|
||||
// triggering a new session will update the session data in the cookies so that our hooks.server.ts doesn't always have to hit the DB when checking if user is logged in or not. Without the session cookie, every page navigation or route would always hit the database to check if user is logged in or not.
|
||||
if (!data.locals.fromSessions && isSessionReady) {
|
||||
if (!data?.locals?.fromSessions && isSessionReady) {
|
||||
authClient.getSession().then(() => {
|
||||
console.log('triggered new session');
|
||||
});
|
||||
|
||||
@@ -12,5 +12,8 @@
|
||||
"enabled": true,
|
||||
"invocation_logs": true
|
||||
}
|
||||
},
|
||||
"secrets": {
|
||||
"required": ["PRIVATE_SERVER_KEY"]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user