diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-01-05 17:12:21 +1100 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-01-05 17:16:55 +1100 |
commit | df449169bde6c0576757700f68f2d406139cc846 (patch) | |
tree | f8bcbaf30ed3ed007d392a51614a134e543e3c17 /src/api/Server.ts | |
parent | channel flags whoops (diff) | |
download | server-df449169bde6c0576757700f68f2d406139cc846.tar.xz |
Prettier
Diffstat (limited to 'src/api/Server.ts')
-rw-r--r-- | src/api/Server.ts | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/api/Server.ts b/src/api/Server.ts index b8d1f9f6..fff94936 100644 --- a/src/api/Server.ts +++ b/src/api/Server.ts @@ -14,7 +14,7 @@ import { initInstance } from "./util/handlers/Instance"; import { registerRoutes } from "@fosscord/util"; import { red } from "picocolors"; -export interface FosscordServerOptions extends ServerOptions { } +export interface FosscordServerOptions extends ServerOptions {} declare global { namespace Express { @@ -76,15 +76,12 @@ export class FosscordServer extends Server { // 404 is not an error in express, so this should not be an error middleware // this is a fine place to put the 404 handler because its after we register the routes // and since its not an error middleware, our error handler below still works. - api.use( - "*", - (req: Request, res: Response, next: NextFunction) => { - res.status(404).json({ - message: "404 endpoint not found", - code: 0, - }); - }, - ); + api.use("*", (req: Request, res: Response, next: NextFunction) => { + res.status(404).json({ + message: "404 endpoint not found", + code: 0, + }); + }); this.app = app; |