diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-10-11 15:21:11 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-10-11 15:21:11 +0200 |
commit | dce8657557b336de656b7b53e4bacba3a1014d74 (patch) | |
tree | d8f7fb8e5e742912cb6a9de232a21ddbc3169232 /api/src | |
parent | Merge pull request #435 from TheArcaneBrony/change-enums-to-number (diff) | |
download | server-dce8657557b336de656b7b53e4bacba3a1014d74.tar.xz |
:bug: fix #371
Diffstat (limited to 'api/src')
-rw-r--r-- | api/src/routes/guilds/#guild_id/channels.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/api/src/routes/guilds/#guild_id/channels.ts b/api/src/routes/guilds/#guild_id/channels.ts index a36e5448..a921fa21 100644 --- a/api/src/routes/guilds/#guild_id/channels.ts +++ b/api/src/routes/guilds/#guild_id/channels.ts @@ -31,10 +31,10 @@ router.patch("/", route({ body: "ChannelReorderSchema", permission: "MANAGE_CHAN await Promise.all([ body.map(async (x) => { - if (!x.position && !x.parent_id) throw new HTTPError(`You need to at least specify position or parent_id`, 400); + if (x.position == null && !x.parent_id) throw new HTTPError(`You need to at least specify position or parent_id`, 400); const opts: any = {}; - if (x.position) opts.position = x.position; + if (x.position != null) opts.position = x.position; if (x.parent_id) { opts.parent_id = x.parent_id; |