Fixing invalid invoker util URLs

merge-requests/1/head
Rasika Perera 8 years ago
parent 3f9bcd50ea
commit 0d07295623

@ -24,7 +24,7 @@ function onRequest(context) {
if (devices) {
return {
"devices": stringify(devices),
"backendApiUri": devicemgtProps["httpsURL"] + "/android_sense/stats/"
"backendApiUri": "/android_sense/stats/"
};
} else if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) {
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
@ -32,7 +32,7 @@ function onRequest(context) {
if (device && device.status != "error") {
return {
"device": device.content,
"backendApiUrl": devicemgtProps["httpsURL"] + "/android_sense/stats/" + deviceId + "/sensors/"
"backendApiUrl": "/android_sense/stats/" + deviceId + "/sensors/"
};
} else {
response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!");

@ -26,7 +26,7 @@ function onRequest(context) {
if (devices) {
return {
"devices": stringify(devices),
"backendApiUri": devicemgtProps["httpsURL"] + "/arduino/device/stats/"
"backendApiUri": "/arduino/device/stats/"
};
} else if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) {
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
@ -34,7 +34,7 @@ function onRequest(context) {
if (device && device.status != "error") {
return {
"device": device.content,
"backendApiUri": devicemgtProps["httpsURL"] + "/arduino/device/stats/" + deviceId
"backendApiUri": "/arduino/device/stats/" + deviceId
};
} else {
response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!");

@ -26,7 +26,7 @@ function onRequest(context) {
if (devices) {
return {
"devices": stringify(devices),
"backendApiUri": devicemgtProps["httpsURL"] + "/raspberrypi/device/stats/"
"backendApiUri": "/raspberrypi/device/stats/"
};
} else if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) {
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
@ -34,7 +34,7 @@ function onRequest(context) {
if (device && device.status != "error") {
return {
"device": device.content,
"backendApiUri": devicemgtProps["httpsURL"] + "/raspberrypi/device/stats/" + deviceId
"backendApiUri": "/raspberrypi/device/stats/" + deviceId
};
} else {
response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!");

@ -26,7 +26,7 @@ function onRequest(context) {
if (devices) {
return {
"devices": stringify(devices),
"backendApiUri": devicemgtProps["httpsURL"] + "/virtual_firealarm/device/stats/"
"backendApiUri": "/virtual_firealarm/device/stats/"
};
} else if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) {
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
@ -34,7 +34,7 @@ function onRequest(context) {
if (device && device.status != "error") {
return {
"device": device.content,
"backendApiUri": devicemgtProps["httpsURL"] + "/virtual_firealarm/device/stats/" + deviceId
"backendApiUri": "/virtual_firealarm/device/stats/" + deviceId
};
} else {
response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!");

Loading…
Cancel
Save