diff options
Diffstat (limited to 'src/api/routes/channels/#channel_id/webhooks.ts')
-rw-r--r-- | src/api/routes/channels/#channel_id/webhooks.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/api/routes/channels/#channel_id/webhooks.ts b/src/api/routes/channels/#channel_id/webhooks.ts index d54756a1..864fe834 100644 --- a/src/api/routes/channels/#channel_id/webhooks.ts +++ b/src/api/routes/channels/#channel_id/webhooks.ts @@ -47,7 +47,7 @@ router.get( }), async (req: Request, res: Response) => { res.json([]); - }, + } ); // TODO: use Image Data Type for avatar instead of String @@ -77,8 +77,7 @@ router.post( const webhook_count = await Webhook.count({ where: { channel_id } }); const { maxWebhooks } = Config.get().limits.channel; - if (maxWebhooks && webhook_count > maxWebhooks) - throw DiscordApiErrors.MAXIMUM_WEBHOOKS.withParams(maxWebhooks); + if (maxWebhooks && webhook_count > maxWebhooks) throw DiscordApiErrors.MAXIMUM_WEBHOOKS.withParams(maxWebhooks); let { avatar, name } = req.body as WebhookCreateSchema; name = trimSpecial(name); @@ -105,7 +104,7 @@ router.post( ...hook, user: user, }); - }, + } ); export default router; |