summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/api/routes/guilds/#guild_id/index.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/api/routes/guilds/#guild_id/index.ts b/src/api/routes/guilds/#guild_id/index.ts
index adcd585c..df21cf95 100644
--- a/src/api/routes/guilds/#guild_id/index.ts
+++ b/src/api/routes/guilds/#guild_id/index.ts
@@ -157,6 +157,9 @@ router.patch(
 			guild.features = body.features;
 		}
 
+		// TODO: check if body ids are valid
+		guild.assign(body);
+
 		if (body.public_updates_channel_id == "1") {
 			// move all channels up 1
 			await Channel.createQueryBuilder("channels")
@@ -185,7 +188,7 @@ router.patch(
 				{ skipPermissionCheck: true },
 			);
 
-			guild.rules_channel_id = channel.id;
+			guild.public_updates_channel_id = channel.id;
 		} else if (body.public_updates_channel_id != undefined) {
 			// ensure channel exists in this guild
 			await Channel.findOneOrFail({
@@ -231,9 +234,6 @@ router.patch(
 			});
 		}
 
-		// TODO: check if body ids are valid
-		guild.assign(body);
-
 		const data = guild.toJSON();
 		// TODO: guild hashes
 		// TODO: fix vanity_url_code, template_id