feat(frontend): added logout page

This commit is contained in:
Maieul BOYER 2025-12-12 15:49:47 +01:00
parent 4a56c92667
commit 8222ec4ea3
No known key found for this signature in database
3 changed files with 20 additions and 0 deletions

View file

@ -0,0 +1,16 @@
import { addRoute, navigateTo, setTitle, type RouteHandlerReturn } from "@app/routing";
import cookie from "js-cookie";
async function route(_url: string, _args: { [k: string]: string }): Promise<RouteHandlerReturn> {
setTitle('Logout')
return {
html: "you should have been logged out", postInsert: async (app) => {
cookie.remove("token");
navigateTo("/");
}
};
}
addRoute('/logout', route, { bypass_auth: true })