feur
This commit is contained in:
parent
8b6a86f17a
commit
3aea126342
14 changed files with 205 additions and 67 deletions
9
api/logout.ts
Normal file
9
api/logout.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
import { Context } from "https://deno.land/x/hono@v4.3.10/mod.ts";
|
||||
import { BlankInput } from "https://deno.land/x/hono@v4.3.10/types.ts";
|
||||
import { FeurEnv } from "../main.ts";
|
||||
import { set_user } from "../lib/auth.ts";
|
||||
|
||||
export function logout_route(context: Context<FeurEnv, string, BlankInput>) {
|
||||
set_user(context, null);
|
||||
return context.redirect("/");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue