mirror of
https://github.com/fosrl/pangolin.git
synced 2025-07-16 08:54:58 +02:00
added auth middleware
This commit is contained in:
parent
7dbf4307e7
commit
942dbd8e56
4 changed files with 44 additions and 0 deletions
|
@ -6,6 +6,7 @@ import * as target from "./target";
|
|||
import * as user from "./user";
|
||||
import * as auth from "./auth";
|
||||
import HttpCode from "@server/types/HttpCode";
|
||||
import { verifySessionMiddleware } from "@server/middlewares";
|
||||
|
||||
// Root routes
|
||||
export const unauthenticated = Router();
|
||||
|
@ -16,6 +17,7 @@ unauthenticated.get("/", (_, res) => {
|
|||
|
||||
// Authenticated Root routes
|
||||
export const authenticated = Router();
|
||||
authenticated.use(verifySessionMiddleware);
|
||||
|
||||
authenticated.put("/org", org.createOrg);
|
||||
authenticated.get("/orgs", org.listOrgs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue