summary refs log tree commit diff
path: root/api/src/routes/guilds/#guild_id/channels.ts
diff options
context:
space:
mode:
authorSamuel <34555296+Flam3rboy@users.noreply.github.com>2021-10-15 00:47:19 +0200
committerGitHub <noreply@github.com>2021-10-15 00:47:19 +0200
commit330e9081a73211524d47f9398879bedb67ad7275 (patch)
treed1c1e122507a2c37914931df75c77f9c2614b9de /api/src/routes/guilds/#guild_id/channels.ts
parentMerge pull request #438 from Mr2u/dev (diff)
parent:art: exclude healthz/readyz from auth (diff)
downloadserver-330e9081a73211524d47f9398879bedb67ad7275.tar.xz
Merge pull request #454 from hbjydev/status-probes
[API] Status Probes
Diffstat (limited to 'api/src/routes/guilds/#guild_id/channels.ts')
-rw-r--r--api/src/routes/guilds/#guild_id/channels.ts4
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;