From dc81bcf90042be12e158aaa9aaafd779041957cf Mon Sep 17 00:00:00 2001 From: TomatoCake <60300461+DEVTomatoCake@users.noreply.github.com> Date: Sat, 24 Aug 2024 08:46:04 +0200 Subject: [PATCH] Run prettier --- scripts/openapi.js | 3 ++- src/api/middlewares/Authentication.ts | 3 ++- .../scheduled-maintenances/upcoming.json.ts | 16 ++++++---------- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/scripts/openapi.js b/scripts/openapi.js index e6c52a17..ca3e7b21 100644 --- a/scripts/openapi.js +++ b/scripts/openapi.js @@ -134,7 +134,8 @@ function apiRoutes(missingRoutes) { if ( !NO_AUTHORIZATION_ROUTES.some((x) => { - if (typeof x === "string") return (method.toUpperCase() + " " + path).startsWith(x); + if (typeof x === "string") + return (method.toUpperCase() + " " + path).startsWith(x); return x.test(method.toUpperCase() + " " + path); }) ) { diff --git a/src/api/middlewares/Authentication.ts b/src/api/middlewares/Authentication.ts index 01076e8c..ffefee8f 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 a978f88b..18f99ec9 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;