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/webhooks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'api/src/routes/channels/#channel_id/webhooks.ts') diff --git a/api/src/routes/channels/#channel_id/webhooks.ts b/api/src/routes/channels/#channel_id/webhooks.ts index 92895da6..cfb276ba 100644 --- a/api/src/routes/channels/#channel_id/webhooks.ts +++ b/api/src/routes/channels/#channel_id/webhooks.ts @@ -31,7 +31,7 @@ router.post("/", route({ body: "WebhookCreateSchema", permission: "MANAGE_WEBHOO const { maxWebhooks } = Config.get().limits.channel; if (webhook_count > maxWebhooks) throw DiscordApiErrors.MAXIMUM_WEBHOOKS.withParams(maxWebhooks); - var { avatar, name } = req.body as { name: string; avatar?: string }; + let { avatar, name } = req.body as { name: string; avatar?: string }; name = trimSpecial(name); if (name === "clyde") throw new HTTPError("Invalid name", 400); -- cgit 1.5.1