From 0a8ceb9e6349284e75545a01ffad608b020f78e2 Mon Sep 17 00:00:00 2001 From: "Emma [it/its]@Rory&" Date: Mon, 11 Dec 2023 01:12:54 +0100 Subject: Actually run prettier --- src/api/middlewares/Authentication.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/api/middlewares/Authentication.ts') diff --git a/src/api/middlewares/Authentication.ts b/src/api/middlewares/Authentication.ts index 9e41b453..8451d69e 100644 --- a/src/api/middlewares/Authentication.ts +++ b/src/api/middlewares/Authentication.ts @@ -71,11 +71,7 @@ declare global { } } -export async function Authentication( - req: Request, - res: Response, - next: NextFunction, -) { +export async function Authentication(req: Request, res: Response, next: NextFunction) { if (req.method === "OPTIONS") return res.sendStatus(204); const url = req.url.replace(API_PREFIX, ""); if (url.startsWith("/invites") && req.method === "GET") return next(); @@ -86,8 +82,7 @@ export async function Authentication( }) ) return next(); - if (!req.headers.authorization) - return next(new HTTPError("Missing Authorization Header", 401)); + if (!req.headers.authorization) return next(new HTTPError("Missing Authorization Header", 401)); Sentry.setUser({ id: req.user_id }); -- cgit 1.5.1