Prettier
This commit is contained in:
parent
2a7051bdc8
commit
126a881f31
@ -4,3 +4,5 @@ node_modules
|
||||
.github
|
||||
.vscode
|
||||
hashes.json
|
||||
flake.lock
|
||||
extra/admin-api
|
@ -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)
|
||||
|
||||
|
@ -61,7 +61,7 @@ declare global {
|
||||
}
|
||||
|
||||
export class SpacebarServer extends Server {
|
||||
public declare options: SpacebarServerOptions;
|
||||
declare public options: SpacebarServerOptions;
|
||||
|
||||
constructor(opts?: Partial<SpacebarServerOptions>) {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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({
|
||||
|
@ -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<CDNServerOptions>) {
|
||||
super(options);
|
||||
|
Loading…
x
Reference in New Issue
Block a user