diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-07-18 18:30:53 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-08-09 23:28:27 +0200 |
commit | e536fb2f72e4883979b451b60b12c44f5f94313c (patch) | |
tree | 9c7fccb12c5aeec560d3c223a3b6e969e8d95cd9 /api/src/routes/channels/#channel_id/permissions.ts | |
parent | Update User.ts (diff) | |
download | server-e536fb2f72e4883979b451b60b12c44f5f94313c.tar.xz |
replace all var with let (reduces warnings)
Diffstat (limited to 'api/src/routes/channels/#channel_id/permissions.ts')
-rw-r--r-- | api/src/routes/channels/#channel_id/permissions.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/api/src/routes/channels/#channel_id/permissions.ts b/api/src/routes/channels/#channel_id/permissions.ts index 2eded853..cdcbde3d 100644 --- a/api/src/routes/channels/#channel_id/permissions.ts +++ b/api/src/routes/channels/#channel_id/permissions.ts @@ -25,7 +25,7 @@ router.put( const { channel_id, overwrite_id } = req.params; const body = req.body as ChannelPermissionOverwriteSchema; - var channel = await Channel.findOneOrFail({ id: channel_id }); + let channel = await Channel.findOneOrFail({ where: {id: channel_id} }); if (!channel.guild_id) throw new HTTPError("Channel not found", 404); if (body.type === 0) { @@ -35,7 +35,7 @@ router.put( } else throw new HTTPError("type not supported", 501); // @ts-ignore - var overwrite: ChannelPermissionOverwrite = channel.permission_overwrites.find((x) => x.id === overwrite_id); + let overwrite: ChannelPermissionOverwrite = channel.permission_overwrites.find((x) => x.id === overwrite_id); if (!overwrite) { // @ts-ignore overwrite = { |