From 8f639711070670966e02d9f3c0d46657a0f76557 Mon Sep 17 00:00:00 2001 From: Andrew Aikman Date: Mon, 2 Sep 2024 16:31:06 +0100 Subject: [PATCH] Fixed data not showing on installation --- shedpi_hub_dashboard/static/shedpi_hub_dashboard/js/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shedpi_hub_dashboard/static/shedpi_hub_dashboard/js/index.js b/shedpi_hub_dashboard/static/shedpi_hub_dashboard/js/index.js index 6c605cf..485da35 100644 --- a/shedpi_hub_dashboard/static/shedpi_hub_dashboard/js/index.js +++ b/shedpi_hub_dashboard/static/shedpi_hub_dashboard/js/index.js @@ -73,7 +73,7 @@ section.append(tableContainer); let loadTableData = function (deviceModuleId) { // const url = section.getAttribute("data-json-feed") - const url = "http://localhost:8000/api/v1/device-module-readings/" + const url = window.location.origin + "/api/v1/device-module-readings/" const endpoint = new URL(url); endpoint.searchParams.append("device_module", deviceModuleId); endpoint.searchParams.append("format", "json");