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 (
|
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);
|
||||||
})
|
})
|
||||||
) {
|
) {
|
||||||
|
@ -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);
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user