You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dick/src/routes/route.public.ts

14 lines
432 B

import { Request, Response, Router } from "express"
import { TEMPLATE } from "../CONSTANTS"
import { Pager } from "../Pager"
export const publicRoutes = (app: Router) => {
app.get("/login", async (req: Request, res: Response) => {
// If the user is already logged in via cookies, redirect them to the dashboard
if (req.user) {
return res.redirect('/')
}
await Pager.render(res, req, TEMPLATE.PUBLIC)
})
}