You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
340 B
TypeScript

import { redirect } from '@sveltejs/kit'
import type { PageServerLoad, Actions } from './$types'
export const load = (async () => {
return {}
}) satisfies PageServerLoad
export const actions = {
signout: async (event) => {
console.log('signout')
event.cookies.delete('token')
throw redirect(303, '/login')
},
} satisfies Actions