diff options
Diffstat (limited to 'src/cdn/routes/role-icons.ts')
-rw-r--r-- | src/cdn/routes/role-icons.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cdn/routes/role-icons.ts b/src/cdn/routes/role-icons.ts index b6e6812e..c3ad51c1 100644 --- a/src/cdn/routes/role-icons.ts +++ b/src/cdn/routes/role-icons.ts @@ -48,10 +48,10 @@ router.post( if (req.headers.signature !== Config.get().security.requestSignature) throw new HTTPError("Invalid request signature"); if (!req.file) throw new HTTPError("Missing file"); - const { buffer, mimetype, size, originalname, fieldname } = req.file; + const { buffer, size } = req.file; const { role_id } = req.params; - var hash = crypto + const hash = crypto .createHash("md5") .update(Snowflake.generate()) .digest("hex"); @@ -76,7 +76,7 @@ router.post( ); router.get("/:role_id", async (req: Request, res: Response) => { - var { role_id } = req.params; + const { role_id } = req.params; //role_id = role_id.split(".")[0]; // remove .file extension const path = `role-icons/${role_id}`; @@ -91,7 +91,7 @@ router.get("/:role_id", async (req: Request, res: Response) => { }); router.get("/:role_id/:hash", async (req: Request, res: Response) => { - var { role_id, hash } = req.params; + const { role_id, hash } = req.params; //hash = hash.split(".")[0]; // remove .file extension const path = `role-icons/${role_id}/${hash}`; |