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");