fix legacy code #2
This commit is contained in:
@@ -108,10 +108,8 @@ export async function checkBetaServer(guildIds: string[]): Promise<boolean[]> {
|
||||
|
||||
if (safeGuildIds.length === 0) return guildIds.map(() => false);
|
||||
|
||||
// Manually construct JSON to preserve u64 precision (native JS numbers lose precision > 2^53)
|
||||
// We want: { "guild_ids": [123, 456] }
|
||||
// checkBotMembership also does this manual construction for the same reason.
|
||||
const body = `{"guild_ids": [${safeGuildIds.join(",")}]}`;
|
||||
// Use JSON.stringify which matches the backend expectation of strings
|
||||
const body = JSON.stringify({ guild_ids: guildIds });
|
||||
|
||||
const response = await fetch(`${process.env.BOT_API_URL}/api/is_beta_server`, {
|
||||
method: "POST",
|
||||
|
||||
Reference in New Issue
Block a user