add log out
This commit is contained in:
parent
8d0c02e27e
commit
d4d2303796
2 changed files with 20 additions and 0 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue