summary refs log tree commit diff
path: root/src/cdn/routes/guild-profiles.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/cdn/routes/guild-profiles.ts')
-rw-r--r--src/cdn/routes/guild-profiles.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cdn/routes/guild-profiles.ts b/src/cdn/routes/guild-profiles.ts
index 517550b7..a02d152c 100644
--- a/src/cdn/routes/guild-profiles.ts
+++ b/src/cdn/routes/guild-profiles.ts
@@ -45,7 +45,7 @@ router.post("/", multer.single("file"), async (req: Request, res: Response) => {
 	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 { guild_id, user_id } = req.params;
 
 	let hash = crypto
@@ -72,7 +72,8 @@ router.post("/", multer.single("file"), async (req: Request, res: Response) => {
 });
 
 router.get("/", async (req: Request, res: Response) => {
-	let { guild_id, user_id } = req.params;
+	const { guild_id } = req.params;
+	let { user_id } = req.params;
 	user_id = user_id.split(".")[0]; // remove .file extension
 	const path = `guilds/${guild_id}/users/${user_id}/avatars`;
 
@@ -87,7 +88,8 @@ router.get("/", async (req: Request, res: Response) => {
 });
 
 router.get("/:hash", async (req: Request, res: Response) => {
-	let { guild_id, user_id, hash } = req.params;
+	const { guild_id, user_id } = req.params;
+	let { hash } = req.params;
 	hash = hash.split(".")[0]; // remove .file extension
 	const path = `guilds/${guild_id}/users/${user_id}/avatars/${hash}`;