updated: app/data-service.js, app/styles.css, app/ui-settings.js, index.html
This commit is contained in:
+8
-2
@@ -210,7 +210,7 @@
|
||||
}
|
||||
|
||||
function toApiAssetUrl(assetPath) {
|
||||
const apiBaseUrl = getApiBaseUrl();
|
||||
const { apiBaseUrl, apiKey } = resolveConnectionSettings();
|
||||
const normalizedAssetPath = String(assetPath || "")
|
||||
.trim()
|
||||
.replace(/^\/+/, "")
|
||||
@@ -220,7 +220,12 @@
|
||||
return "";
|
||||
}
|
||||
|
||||
return new URL(`/api/v1/assets/${encodePathSegments(normalizedAssetPath)}`, `${apiBaseUrl}/`).toString();
|
||||
const url = new URL(`/api/v1/assets/${encodePathSegments(normalizedAssetPath)}`, `${apiBaseUrl}/`);
|
||||
if (apiKey) {
|
||||
url.searchParams.set("apiKey", apiKey);
|
||||
}
|
||||
|
||||
return url.toString();
|
||||
}
|
||||
|
||||
function resetCaches() {
|
||||
@@ -635,6 +640,7 @@
|
||||
reason: "connected",
|
||||
message: "Connected.",
|
||||
health,
|
||||
auth: health?.auth || null,
|
||||
deckCount: Array.isArray(decksPayload?.decks) ? decksPayload.decks.length : null
|
||||
};
|
||||
} catch (_error) {
|
||||
|
||||
Reference in New Issue
Block a user