20 lines
326 B
TypeScript
20 lines
326 B
TypeScript
import type { RouteHandler } from 'fastify'
|
|
|
|
/** @type {import('fastify').FastifySchema} */
|
|
const schema = {
|
|
response: {
|
|
'3XX': {},
|
|
},
|
|
}
|
|
|
|
const logout: RouteHandler = async function (request, reply) {
|
|
await request.logout()
|
|
|
|
return reply.redirect('/admin/login')
|
|
}
|
|
|
|
export default {
|
|
handler: logout,
|
|
schema,
|
|
}
|