From e536fb2f72e4883979b451b60b12c44f5f94313c Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Mon, 18 Jul 2022 18:30:53 +0200 Subject: replace all var with let (reduces warnings) --- api/src/routes/channels/#channel_id/messages/#message_id/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'api/src/routes/channels/#channel_id/messages/#message_id/index.ts') diff --git a/api/src/routes/channels/#channel_id/messages/#message_id/index.ts b/api/src/routes/channels/#channel_id/messages/#message_id/index.ts index 63fee9b9..1f5b68c2 100644 --- a/api/src/routes/channels/#channel_id/messages/#message_id/index.ts +++ b/api/src/routes/channels/#channel_id/messages/#message_id/index.ts @@ -35,7 +35,7 @@ const messageUpload = multer({ router.patch("/", route({ body: "MessageCreateSchema", permission: "SEND_MESSAGES", right: "SEND_MESSAGES" }), async (req: Request, res: Response) => { const { message_id, channel_id } = req.params; - var body = req.body as MessageCreateSchema; + let body = req.body as MessageCreateSchema; const message = await Message.findOneOrFail({ where: { id: message_id, channel_id }, relations: ["attachments"] }); @@ -92,7 +92,7 @@ router.put( route({ body: "MessageCreateSchema", permission: "SEND_MESSAGES", right: "SEND_BACKDATED_EVENTS" }), async (req: Request, res: Response) => { const { channel_id, message_id } = req.params; - var body = req.body as MessageCreateSchema; + let body = req.body as MessageCreateSchema; const attachments: Attachment[] = []; const rights = await getRights(req.user_id); -- cgit 1.5.1