diff --git a/functions/api/game-bans/[user]/history.ts b/functions/api/game-bans/[user]/history.ts index 19b15b0..64553dd 100644 --- a/functions/api/game-bans/[user]/history.ts +++ b/functions/api/game-bans/[user]/history.ts @@ -34,7 +34,11 @@ export async function onRequestGet(context: RequestContext) { try { banList = (await getBanList(context)) as { - [k: number]: { BanType: number }; + [k: number]: { + BanType: number; + hidden_from_leaderboards?: boolean; + serverconfigurator_blacklist?: boolean; + }; }; } catch (e) { console.log(e); @@ -47,8 +51,17 @@ export async function onRequestGet(context: RequestContext) { const banData = banList[users[0].id]; if (!banData?.BanType) current_status = "Not Moderated"; - else if (banData.BanType === 1) current_status = "Hidden from Leaderboards"; - else if (banData.BanType === 2) current_status = "Banned"; + else if (banData.BanType === 1) { + if ( + banData.hidden_from_leaderboards && + banData.serverconfigurator_blacklist + ) + current_status = "Hidden / Server Config Blocked"; + else if (banData.hidden_from_leaderboards) + current_status = "Hidden From Leaderboards"; + else if (banData.serverconfigurator_blacklist) + current_status = "Server Config Blocked"; + } else if (banData.BanType === 2) current_status = "Banned"; const response = { history: (