1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-09-16 15:52:25 +02:00

Run prettier

This commit is contained in:
TomatoCake 2024-08-24 08:46:04 +02:00
parent 74f20898a3
commit dc81bcf900
3 changed files with 10 additions and 12 deletions

View File

@ -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);
})
) {

View File

@ -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);
})
)

View File

@ -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;