mirror of
https://github.com/BradNut/boredgame
synced 2025-09-08 17:40:22 +00:00
12 lines
371 B
TypeScript
12 lines
371 B
TypeScript
import { redirect } from 'sveltekit-flash-message/server';
|
|
import type { Actions } from "./$types";
|
|
import {StatusCodes} from "$lib/constants/status-codes";
|
|
|
|
export const actions: Actions = {
|
|
default: async (event) => {
|
|
const { locals } = event;
|
|
console.log('Signing out user');
|
|
await locals.api.me.logout.$post()
|
|
redirect(StatusCodes.SEE_OTHER, '/login')
|
|
}
|
|
};
|