summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/api')
-rw-r--r--src/api/middlewares/Authentication.ts3
-rw-r--r--src/api/routes/scheduled-maintenances/upcoming.json.ts16
2 files changed, 8 insertions, 11 deletions
diff --git a/src/api/middlewares/Authentication.ts b/src/api/middlewares/Authentication.ts

index 01076e8cb..ffefee8fb 100644 --- a/src/api/middlewares/Authentication.ts +++ b/src/api/middlewares/Authentication.ts
@@ -80,7 +80,8 @@ export async function Authentication( const url = req.url.replace(API_PREFIX, ""); if ( NO_AUTHORIZATION_ROUTES.some((x) => { - if (typeof x === "string") return (req.method + " " + url).startsWith(x); + if (typeof x === "string") + return (req.method + " " + url).startsWith(x); return x.test(req.method + " " + url); }) ) diff --git a/src/api/routes/scheduled-maintenances/upcoming.json.ts b/src/api/routes/scheduled-maintenances/upcoming.json.ts
index a978f88b5..18f99ec99 100644 --- a/src/api/routes/scheduled-maintenances/upcoming.json.ts +++ b/src/api/routes/scheduled-maintenances/upcoming.json.ts
@@ -20,15 +20,11 @@ import { Router, Request, Response } from "express"; import { route } from "@spacebar/api"; const router = Router(); -router.get( - "/", - route({}), - async (req: Request, res: Response) => { - res.json({ - page: {}, - scheduled_maintenances: {}, - }); - }, -); +router.get("/", route({}), async (req: Request, res: Response) => { + res.json({ + page: {}, + scheduled_maintenances: {}, + }); +}); export default router;