From de48463ec989f7adf0fa571bc2df78feeb64c984 Mon Sep 17 00:00:00 2001 From: MathMan05 Date: Mon, 29 Dec 2025 09:01:02 -0600 Subject: [PATCH] fix big bug --- src/webpage/utils/utils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/webpage/utils/utils.ts b/src/webpage/utils/utils.ts index a696f5e..5f28540 100644 --- a/src/webpage/utils/utils.ts +++ b/src/webpage/utils/utils.ts @@ -430,7 +430,7 @@ export async function getapiurls(str: string): Promise< | false > { function appendApi(str: string) { - return str.includes("api") ? "" : str.endsWith("/") ? "api" : "/api"; + return str.includes("api") ? str : str.endsWith("/") ? str + "api" : str + "/api"; } if (!URL.canParse(str)) { const val = stringURLMap.get(str); @@ -534,11 +534,11 @@ export async function getapiurls(str: string): Promise< ).then((x) => x.json()); const apiurl = new URL(info.apiEndpoint); urls = { - api: info.apiEndpoint + appendApi(apiurl.pathname), + api: apiurl.origin + appendApi(apiurl.pathname), gateway: info.gateway, cdn: info.cdn, wellknown: str, - login: info.apiEndpoint + appendApi(apiurl.pathname), + login: apiurl.origin + appendApi(apiurl.pathname), }; fixApi(); } catch {