Migrate SvelteKit to the latest version 431 (#526)

This commit is contained in:
Alex
2022-08-24 21:10:48 -07:00
committed by GitHub
parent fb0fa742f5
commit db2ed2d881
47 changed files with 1509 additions and 1216 deletions

View File

@@ -0,0 +1,27 @@
import { json } from '@sveltejs/kit';
import { api, serverApi } from '@api';
import type { RequestHandler } from '@sveltejs/kit';
export const POST: RequestHandler = async () => {
api.removeAccessToken();
serverApi.removeAccessToken();
const headers = new Headers();
headers.append(
'set-cookie',
'immich_is_authenticated=deleted; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT;'
);
headers.append(
'set-cookie',
'immich_access_token=delete; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT'
);
return json(
{
ok: true
},
{
headers
}
);
};