File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed
Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { auth } from "$lib/server/lucia";
66
77export const actions : Actions = {
88 logout : async ( { locals } ) => {
9- const session = await locals . auth . validate ( ) ;
9+ const session = await locals . auth ? .validate ( ) ;
1010
1111 if ( ! session ) return fail ( 401 ) ;
1212
Original file line number Diff line number Diff line change 11import type { LayoutServerLoad } from "./$types" ;
22
33export const load : LayoutServerLoad = async ( { locals } ) => {
4- const session = await locals . auth . validate ( ) ;
4+ const session = await locals . auth ? .validate ( ) ;
55
66 if ( ! session ) return ;
77
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { dev } from "$app/environment";
22import { spotifyAuth } from "$lib/server/lucia.js" ;
33
44export const GET = async ( { cookies, locals } ) => {
5- const session = await locals . auth . validate ( ) ;
5+ const session = await locals . auth ? .validate ( ) ;
66
77 if ( session ) {
88 return new Response ( null , {
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ async function getUser({
2727}
2828
2929export const GET = async ( { url, cookies, locals } ) => {
30- const session = await locals . auth . validate ( ) ;
30+ const session = await locals . auth ? .validate ( ) ;
3131 if ( session ) {
3232 return new Response ( null , {
3333 status : 302 ,
You can’t perform that action at this time.
0 commit comments