1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-22 02:12:40 +01: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 ( if (
!NO_AUTHORIZATION_ROUTES.some((x) => { !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); return x.test(method.toUpperCase() + " " + path);
}) })
) { ) {

View File

@ -80,7 +80,8 @@ export async function Authentication(
const url = req.url.replace(API_PREFIX, ""); const url = req.url.replace(API_PREFIX, "");
if ( if (
NO_AUTHORIZATION_ROUTES.some((x) => { 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); return x.test(req.method + " " + url);
}) })
) )

View File

@ -20,15 +20,11 @@ import { Router, Request, Response } from "express";
import { route } from "@spacebar/api"; import { route } from "@spacebar/api";
const router = Router(); const router = Router();
router.get( router.get("/", route({}), async (req: Request, res: Response) => {
"/", res.json({
route({}), page: {},
async (req: Request, res: Response) => { scheduled_maintenances: {},
res.json({ });
page: {}, });
scheduled_maintenances: {},
});
},
);
export default router; export default router;