add log out

This commit is contained in:
biglyderv 2025-02-25 19:51:46 -05:00
parent 8d0c02e27e
commit d4d2303796
Signed by: biglyderv
GPG key ID: 0E2EB0B4CD7397B5
2 changed files with 20 additions and 0 deletions

View file

@ -1,6 +1,8 @@
import { Router } from "express";
const router = Router();
//todo: fix jank
router.get('/login', (req, res, next) => {
res.ctx.mainPage = 'form'
res.ctx.mainCtx = {
@ -25,6 +27,18 @@ router.get('/login', (req, res, next) => {
next();
})
router.get('/logout', (req, res, next) => {
res.ctx.mainPage = 'form'
res.ctx.mainCtx = {
title: "Log out",
message: 'Are you sure?',
action: "/api/form/you/logout",
inputs: []
}
next();
})
router.get('/new', (req, res, next) => {
res.ctx.mainPage = 'form'
res.ctx.mainCtx = {