fix(minecraft-status): wrong api path for bedrock (#2551)

This commit is contained in:
Meier Lukas
2025-03-09 14:24:27 +01:00
committed by GitHub
parent 8f8d7884a9
commit 2f80c096a7
2 changed files with 9 additions and 7 deletions

View File

@@ -9,7 +9,7 @@ export const minecraftServerStatusRequestHandler = createCachedWidgetRequestHand
queryKey: "minecraftServerStatusApiResult",
widgetKind: "minecraftServerStatus",
async requestAsync(input: { domain: string; isBedrockServer: boolean }) {
const path = `/3/${input.isBedrockServer ? "bedrock/" : ""}${input.domain}`;
const path = `${input.isBedrockServer ? "/bedrock" : ""}/3/${input.domain}`;
const response = await fetchWithTimeout(`https://api.mcsrvstat.us${path}`);
return responseSchema.parse(await response.json());