From 1495500f2b55b8963466cbbb76b1a9878671e989 Mon Sep 17 00:00:00 2001 From: Katalina Okano Date: Mon, 21 Dec 2020 22:08:42 -0500 Subject: [PATCH] fix(API): highest role position was incorrectly calculated starting from the highest instead of the lowest. fixes #97 --- src/backend-worker/utils/guild.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend-worker/utils/guild.ts b/src/backend-worker/utils/guild.ts index 9340d3c..70f57bb 100644 --- a/src/backend-worker/utils/guild.ts +++ b/src/backend-worker/utils/guild.ts @@ -60,7 +60,7 @@ export const getGuild = cacheLayer( } return role.position; - }, guildRaw.roles.length - 1); + }, 0); const roles = guildRaw.roles.map((role) => ({ id: role.id,