diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-08-27 05:18:48 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-09-04 10:48:54 +0200 |
commit | 7d936efb2f37db42c3e57ee9a915ed4d5ab8e25f (patch) | |
tree | 69d68d640c4ac2946b118591f02de9d3c24fb29b /src/api/routes/channels/#channel_id/recipients.ts | |
parent | Add sqlite migration for plugin settings (diff) | |
download | server-7d936efb2f37db42c3e57ee9a915ed4d5ab8e25f.tar.xz |
Cleanup, reformat, fix some todos, git hook
fixup! Cleanup, reformat, fix some todos, git hook
Diffstat (limited to 'src/api/routes/channels/#channel_id/recipients.ts')
-rw-r--r-- | src/api/routes/channels/#channel_id/recipients.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/routes/channels/#channel_id/recipients.ts b/src/api/routes/channels/#channel_id/recipients.ts index 276a0eda..fc6b6b4f 100644 --- a/src/api/routes/channels/#channel_id/recipients.ts +++ b/src/api/routes/channels/#channel_id/recipients.ts @@ -26,7 +26,7 @@ router.put("/:user_id", route({}), async (req: Request, res: Response) => { return res.status(201).json(new_channel); } else { if (channel.recipients!.map((r) => r.user_id).includes(user_id)) { - throw DiscordApiErrors.INVALID_RECIPIENT; //TODO is this the right error? + throw DiscordApiErrors.INVALID_RECIPIENT; //TODO: is this the right error? } channel.recipients!.push(OrmUtils.mergeDeep(new Recipient(), { channel_id, user_id: user_id })); @@ -57,7 +57,7 @@ router.delete("/:user_id", route({}), async (req: Request, res: Response) => { throw DiscordApiErrors.MISSING_PERMISSIONS; if (!channel.recipients!.map((r) => r.user_id).includes(user_id)) { - throw DiscordApiErrors.INVALID_RECIPIENT; //TODO is this the right error? + throw DiscordApiErrors.INVALID_RECIPIENT; //TODO: is this the right error? } await Channel.removeRecipientFromChannel(channel, user_id); |