diff --git a/.prettierignore b/.prettierignore index 9531c159..a1e4b5b1 100644 --- a/.prettierignore +++ b/.prettierignore @@ -4,3 +4,5 @@ node_modules .github .vscode hashes.json +flake.lock +extra/admin-api \ No newline at end of file diff --git a/README.md b/README.md index 0af38303..f4890b7b 100644 --- a/README.md +++ b/README.md @@ -21,10 +21,10 @@ We aim to reverse engineer and add additional features to the Discord backend, w This repository contains: -- [Spacebar HTTP API Server](/src/api) -- [WebSocket Gateway Server](/src/gateway) -- [HTTP CDN Server](/src/cdn) -- [Utility and Database Models](/src/util) +- [Spacebar HTTP API Server](/src/api) +- [WebSocket Gateway Server](/src/gateway) +- [HTTP CDN Server](/src/cdn) +- [Utility and Database Models](/src/util) ## [Documentation](https://docs.spacebar.chat) diff --git a/src/api/Server.ts b/src/api/Server.ts index 0e4030de..382b07ee 100644 --- a/src/api/Server.ts +++ b/src/api/Server.ts @@ -61,7 +61,7 @@ declare global { } export class SpacebarServer extends Server { - public declare options: SpacebarServerOptions; + declare public options: SpacebarServerOptions; constructor(opts?: Partial) { // eslint-disable-next-line @typescript-eslint/ban-ts-comment diff --git a/src/api/middlewares/ImageProxy.ts b/src/api/middlewares/ImageProxy.ts index 185d3eac..814f0e6d 100644 --- a/src/api/middlewares/ImageProxy.ts +++ b/src/api/middlewares/ImageProxy.ts @@ -157,11 +157,13 @@ export async function ImageProxy(req: Request, res: Response) { const buffer = Buffer.from(arrayBuffer); if (sharp && sharpSupported.has(contentType)) { - resultBuffer = Buffer.from(await sharp - .default(buffer) - // Sharp doesn't support "scaleToFit" - .resize(width) - .toBuffer()); + resultBuffer = Buffer.from( + await sharp + .default(buffer) + // Sharp doesn't support "scaleToFit" + .resize(width) + .toBuffer(), + ); } else if (Jimp && jimpSupported.has(contentType)) { resultBuffer = await Jimp.read(buffer).then((image) => { contentType = image.getMIME(); @@ -183,5 +185,3 @@ export async function ImageProxy(req: Request, res: Response) { res.send(resultBuffer); } - - diff --git a/src/api/routes/auth/reset.ts b/src/api/routes/auth/reset.ts index 8ec6df71..da6b11ce 100644 --- a/src/api/routes/auth/reset.ts +++ b/src/api/routes/auth/reset.ts @@ -49,7 +49,9 @@ router.post( let user; try { - const userTokenData = await checkToken(token, {select : ["email"]}); + const userTokenData = await checkToken(token, { + select: ["email"], + }); user = userTokenData.user; } catch { throw FieldErrors({ diff --git a/src/cdn/Server.ts b/src/cdn/Server.ts index a2cde7e0..a16b8ed6 100644 --- a/src/cdn/Server.ts +++ b/src/cdn/Server.ts @@ -28,7 +28,7 @@ import { BodyParser } from "../api/middlewares/BodyParser"; export type CDNServerOptions = ServerOptions; export class CDNServer extends Server { - public declare options: CDNServerOptions; + declare public options: CDNServerOptions; constructor(options?: Partial) { super(options);