summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-10-04 23:48:00 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-10-04 23:48:00 +1100
commit6bf4637a03c6d251cf43542788de7d3d02374077 (patch)
tree39d8fe2beebe8cb229b6e5a492bedff649ae234b /src/api
parentfucking prettier (diff)
downloadserver-6bf4637a03c6d251cf43542788de7d3d02374077.tar.xz
fucking postgres
Diffstat (limited to 'src/api')
-rw-r--r--src/api/routes/guilds/#guild_id/channels.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/api/routes/guilds/#guild_id/channels.ts b/src/api/routes/guilds/#guild_id/channels.ts
index 671d07ea..68208fee 100644
--- a/src/api/routes/guilds/#guild_id/channels.ts
+++ b/src/api/routes/guilds/#guild_id/channels.ts
@@ -98,11 +98,11 @@ router.patch(
 
 		const guild = await Guild.findOneOrFail({
 			where: { id: guild_id },
-			select: { channelOrdering: true },
+			select: { channel_ordering: true },
 		});
 
 		// The channels not listed for this query
-		const notMentioned = guild.channelOrdering.filter(
+		const notMentioned = guild.channel_ordering.filter(
 			(x) => !body.find((c) => c.id == x),
 		);
 
@@ -159,7 +159,10 @@ router.patch(
 			}),
 		);
 
-		await Guild.update({ id: guild_id }, { channelOrdering: notMentioned });
+		await Guild.update(
+			{ id: guild_id },
+			{ channel_ordering: notMentioned },
+		);
 
 		return res.sendStatus(204);
 	},