mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-22 02:12:40 +01:00
Run prettier
This commit is contained in:
parent
74f20898a3
commit
dc81bcf900
@ -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);
|
||||
})
|
||||
) {
|
||||
|
@ -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);
|
||||
})
|
||||
)
|
||||
|
@ -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) => {
|
||||
router.get("/", route({}), async (req: Request, res: Response) => {
|
||||
res.json({
|
||||
page: {},
|
||||
scheduled_maintenances: {},
|
||||
});
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
export default router;
|
||||
|
Loading…
Reference in New Issue
Block a user