import { redirect } from '@sveltejs/kit';
import type { Actions } from './$types';

const AUTH_COOKIE = 'libnovel_auth';

export const actions: Actions = {
	default: async ({ cookies }) => {
		cookies.delete(AUTH_COOKIE, { path: '/' });
		redirect(302, '/login');
	}
};
