1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2025-06-21 00:55:17 +00:00

Can check user tokens

This commit is contained in:
2019-11-23 13:47:06 +01:00
parent 1ddf156cc4
commit c304c2f88e
4 changed files with 70 additions and 3 deletions

View File

@ -17,14 +17,15 @@ export interface Route {
type ?: RouteType,
path: string,
cb: (req : RequestHandler) => Promise<void> | void,
needLogin ?: boolean, // Default = true
}
export const Routes : Route[] = [
// Welcome controller
{type: RouteType.GET, path: "/", cb: WelcomeController.HomeMessage},
{type: RouteType.GET, path: "/", cb: WelcomeController.HomeMessage, needLogin: false},
// Account controller
{path: "/account/login", cb: AccountController.LoginUser},
{path: "/user/connectUSER", cb: AccountController.LoginUser}, // Legacy
{path: "/account/login", cb: AccountController.LoginUser, needLogin: false},
{path: "/user/connectUSER", cb: AccountController.LoginUser, needLogin: false}, // Legacy
]