trailing / are now allowed

This commit is contained in:
MathMan05
2025-11-29 15:23:59 -06:00
parent cbd1141c15
commit 7909f684d7
+5
View File
@@ -465,6 +465,11 @@ export async function getapiurls(str: string): Promise<
let api: string;
try {
const info = await fetch(`${str}.well-known/spacebar`).then((x) => x.json());
if (info.api.endsWith("/")) {
const temp = info.api.split("/");
temp.pop();
info.api = temp.join("/");
}
api = info.api;
} catch {
api = str;