make session cookie name a variable
All checks were successful
delpoy / build-and-deploy (push) Successful in 27s
All checks were successful
delpoy / build-and-deploy (push) Successful in 27s
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import type { RequestHandler } from '@sveltejs/kit';
|
||||
import { deleteSession, getSession } from '$lib/server/session';
|
||||
import { deleteSession, getSession, sessionCookieName } from '$lib/server/session';
|
||||
|
||||
export const POST = (async ({ cookies }) => {
|
||||
if (getSession(cookies) == null) {
|
||||
@ -9,7 +9,7 @@ export const POST = (async ({ cookies }) => {
|
||||
}
|
||||
|
||||
deleteSession(cookies);
|
||||
cookies.delete('session');
|
||||
cookies.delete(sessionCookieName);
|
||||
|
||||
return new Response();
|
||||
}) satisfies RequestHandler;
|
||||
|
Reference in New Issue
Block a user