diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-08-12 00:42:14 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-08-12 00:42:14 +1000 |
commit | 3eb2338c3ea0dd6f5fdb6149f7573fdede28afd7 (patch) | |
tree | fa4dce8944763300ceda3a587e6448d08b6d7c54 /src/api/routes/guilds/#guild_id/index.ts | |
parent | fix min password length check (diff) | |
download | server-3eb2338c3ea0dd6f5fdb6149f7573fdede28afd7.tar.xz |
goof
Diffstat (limited to 'src/api/routes/guilds/#guild_id/index.ts')
-rw-r--r-- | src/api/routes/guilds/#guild_id/index.ts | 8 |
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 |