clear cookie
This commit is contained in:
parent
2a58b0698b
commit
de76af0a8a
1 changed files with 2 additions and 1 deletions
|
@ -1,9 +1,10 @@
|
||||||
import { redirect } from '@sveltejs/kit';
|
import { redirect } from '@sveltejs/kit';
|
||||||
import type { RequestHandler } from './$types';
|
import type { RequestHandler } from './$types';
|
||||||
|
|
||||||
export const GET: RequestHandler = async ({ locals }) => {
|
export const GET: RequestHandler = async ({ locals, cookies }) => {
|
||||||
try {
|
try {
|
||||||
await locals.comm.get('/auth/logout');
|
await locals.comm.get('/auth/logout');
|
||||||
|
cookies.delete('apiKey', { path: '/new' });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
return redirect(307, `${process.env.DASHBOARD_URL}/new`);
|
return redirect(307, `${process.env.DASHBOARD_URL}/new`);
|
||||||
|
|
Loading…
Add table
Reference in a new issue