Polarcraft/webv2/server/api/auth/index.delete.ts

5 lines
143 B
TypeScript
Raw Normal View History

2023-06-26 15:16:24 +02:00
export default defineEventHandler((event) => {
setCookie(event, 'jwt', '', { httpOnly: true, maxAge: 1 })
sendRedirect(event, '/', 302)
})