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

export const actions = {
	default: async ({ cookies }) => {
		// Das Auth-Cookie löschen
		cookies.delete('auth_token', { path: '/' });

		// Zur Login-Seite werfen
		throw redirect(302, '/login');
	}
} satisfies Actions;
