diff --git a/src/components/FirmwareUpdateCard.vue b/src/components/FirmwareUpdateCard.vue index 2c72b95..9c26ff7 100644 --- a/src/components/FirmwareUpdateCard.vue +++ b/src/components/FirmwareUpdateCard.vue @@ -199,6 +199,22 @@ export default { console.log("Selected firmware:", selectedFirmware); try { + const baseUrl = otaUrl.value.substring( + 0, + otaUrl.value.lastIndexOf("/") + 1, + ); + const relativeUrl = selectedFirmware.files.rom.url; + const fullUrl = baseUrl + relativeUrl; + + console.log("baseUrl:", baseUrl, "\nrelativeUrl: ", relativeUrl); + console.log("fullUrl: ", fullUrl); + + selectedFirmware.files.rom.url = fullUrl; + + console.log( + "firmwarre structure:", + JSON.stringify(selectedFirmware.files), + ); const postResponse = await fetch( `http://${controllers.currentController["ip_address"]}/update`, { diff --git a/src/stores/storeConstants.js b/src/stores/storeConstants.js index 14a7840..cf65b4a 100644 --- a/src/stores/storeConstants.js +++ b/src/stores/storeConstants.js @@ -2,7 +2,7 @@ export const localhost = { hostname: "localhost", ip_address: process.env.NODE_ENV === "development" - ? "led-so1.fritz.box" + ? "led-te3.fritz.box" : window.location.hostname, };