From 5cc3abf0c558a468dd9914520558443179895773 Mon Sep 17 00:00:00 2001 From: ychung-mot Date: Tue, 23 Aug 2022 10:33:23 -0700 Subject: [PATCH] Weahter API from azurewebsite: not via API Gateway --- CameraWebApp/Pages/Index.cshtml | 2 +- .../src/main/java/org/moti/ecp/GhostCMSRouter.java | 1 + .../src/main/resources/application.properties | 4 +++- .../open511-ghostcms/target/classes/application.properties | 4 +++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CameraWebApp/Pages/Index.cshtml b/CameraWebApp/Pages/Index.cshtml index baed0a1..39cea04 100644 --- a/CameraWebApp/Pages/Index.cshtml +++ b/CameraWebApp/Pages/Index.cshtml @@ -12,7 +12,7 @@
- Last fetched at @Model.UpdatedTime UTC + Last updated at @Model.UpdatedTime UTC
diff --git a/integrations/open511-ghostcms/src/main/java/org/moti/ecp/GhostCMSRouter.java b/integrations/open511-ghostcms/src/main/java/org/moti/ecp/GhostCMSRouter.java index 3d44dfc..b9e3d3b 100644 --- a/integrations/open511-ghostcms/src/main/java/org/moti/ecp/GhostCMSRouter.java +++ b/integrations/open511-ghostcms/src/main/java/org/moti/ecp/GhostCMSRouter.java @@ -51,6 +51,7 @@ public void configure() { // Call IoT Central API .setHeader(Exchange.HTTP_METHOD, simple("GET")) + .setHeader("Authorization", simple("{{iotcentral.auth}}")) .log("API Call to : https://{{iotcentral.weather.api}}") .toD("https://{{iotcentral.weather.api}}") diff --git a/integrations/open511-ghostcms/src/main/resources/application.properties b/integrations/open511-ghostcms/src/main/resources/application.properties index 42937ed..bf3fdfb 100644 --- a/integrations/open511-ghostcms/src/main/resources/application.properties +++ b/integrations/open511-ghostcms/src/main/resources/application.properties @@ -30,7 +30,9 @@ ghostcms.jwtAudience=/v4/admin/ ghostcms.daysToLive=5 #IoT Central -iotcentral.weather.api=moti-weather-dev.api.gov.bc.ca/weather +iotcentral.auth=${IOT_CENTRAL_AUTH} +iotcentral.weather.api=moti-iot-test.azurewebsites.net/api/weather/devices/iotcentral/35094/telemetries/latest + #Open 511 #events URL diff --git a/integrations/open511-ghostcms/target/classes/application.properties b/integrations/open511-ghostcms/target/classes/application.properties index 42937ed..bf3fdfb 100644 --- a/integrations/open511-ghostcms/target/classes/application.properties +++ b/integrations/open511-ghostcms/target/classes/application.properties @@ -30,7 +30,9 @@ ghostcms.jwtAudience=/v4/admin/ ghostcms.daysToLive=5 #IoT Central -iotcentral.weather.api=moti-weather-dev.api.gov.bc.ca/weather +iotcentral.auth=${IOT_CENTRAL_AUTH} +iotcentral.weather.api=moti-iot-test.azurewebsites.net/api/weather/devices/iotcentral/35094/telemetries/latest + #Open 511 #events URL