summary refs log tree commit diff
path: root/api/src/routes/channels/#channel_id/permissions.ts
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2022-07-18 18:30:53 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-09 23:28:27 +0200
commite536fb2f72e4883979b451b60b12c44f5f94313c (patch)
tree9c7fccb12c5aeec560d3c223a3b6e969e8d95cd9 /api/src/routes/channels/#channel_id/permissions.ts
parentUpdate User.ts (diff)
downloadserver-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.ts4
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 = {