mirror of
https://repository.entgra.net/community/product-iots.git
synced 2025-09-16 23:32:19 +00:00
Fixing invalid invoker util URLs
This commit is contained in:
parent
3b3bf6b854
commit
9329e14bc1
@ -24,7 +24,7 @@ function onRequest(context) {
|
||||
if (devices) {
|
||||
return {
|
||||
"devices": stringify(devices),
|
||||
"backendApiUri": devicemgtProps["httpsURL"] + "/CONNECTEDLAP/stats/"
|
||||
"backendApiUri": "/CONNECTEDLAP/stats/"
|
||||
};
|
||||
} else if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) {
|
||||
var deviceModule = require("/app/modules/device.js").deviceModule;
|
||||
@ -32,7 +32,7 @@ function onRequest(context) {
|
||||
if (device && device.status != "error") {
|
||||
return {
|
||||
"device": device.content,
|
||||
"backendApiUrl": devicemgtProps["httpsURL"] + "/CONNECTEDLAP/stats/" + deviceId + "/"
|
||||
"backendApiUrl": "/CONNECTEDLAP/stats/" + deviceId + "/"
|
||||
};
|
||||
} else {
|
||||
response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!");
|
||||
|
||||
@ -28,7 +28,7 @@ function onRequest(context) {
|
||||
var deviceModule = require("/app/modules/device.js").deviceModule;
|
||||
var device = deviceModule.viewDevice(deviceType, deviceId);
|
||||
if (device && device.status != "error") {
|
||||
return {"device": device.content, "backendApiUri" : devicemgtProps["httpsURL"] + "/"+deviceType+"/", "autoCompleteParams" : autoCompleteParams};
|
||||
return {"device": device.content, "backendApiUri" : "/"+deviceType+"/", "autoCompleteParams" : autoCompleteParams};
|
||||
} else {
|
||||
response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!");
|
||||
exit();
|
||||
|
||||
@ -24,7 +24,7 @@ function onRequest(context) {
|
||||
if (devices) {
|
||||
return {
|
||||
"devices": stringify(devices),
|
||||
"backendApiUri": devicemgtProps["httpsURL"] + "/"+deviceType+"/device/stats/"
|
||||
"backendApiUri": "/"+deviceType+"/device/stats/"
|
||||
};
|
||||
} else if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) {
|
||||
var deviceModule = require("/app/modules/device.js").deviceModule;
|
||||
@ -32,7 +32,7 @@ function onRequest(context) {
|
||||
if (device && device.status != "error") {
|
||||
return {
|
||||
"device": device.content,
|
||||
"backendApiUri": devicemgtProps["httpsURL"] + "/"+deviceType+"/device/stats/" + deviceId
|
||||
"backendApiUri": "/"+deviceType+"/device/stats/" + deviceId
|
||||
};
|
||||
} else {
|
||||
response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!");
|
||||
|
||||
@ -28,7 +28,7 @@ function onRequest(context) {
|
||||
var deviceModule = require("/app/modules/device.js").deviceModule;
|
||||
var device = deviceModule.viewDevice(deviceType, deviceId);
|
||||
if (device && device.status != "error") {
|
||||
return {"device": device.content, "backendApiUri" : devicemgtProps["httpsURL"] + "/"+deviceType+"/", "autoCompleteParams" : autoCompleteParams};
|
||||
return {"device": device.content, "backendApiUri" : "/"+deviceType+"/", "autoCompleteParams" : autoCompleteParams};
|
||||
} else {
|
||||
response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!");
|
||||
exit();
|
||||
|
||||
@ -24,7 +24,7 @@ function onRequest(context) {
|
||||
if (devices) {
|
||||
return {
|
||||
"devices": stringify(devices),
|
||||
"backendApiUrl": devicemgtProps["httpsURL"] + "/"+deviceType+"/device/stats/"
|
||||
"backendApiUrl": "/"+deviceType+"/device/stats/"
|
||||
};
|
||||
} else if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) {
|
||||
var deviceModule = require("/app/modules/device.js").deviceModule;
|
||||
@ -32,7 +32,7 @@ function onRequest(context) {
|
||||
if (device && device.status != "error") {
|
||||
return {
|
||||
"device": device.content,
|
||||
"backendApiUrl": devicemgtProps["httpsURL"] + "/"+deviceType+"/device/stats/" + deviceId
|
||||
"backendApiUrl": "/"+deviceType+"/device/stats/" + deviceId
|
||||
};
|
||||
} else {
|
||||
response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!");
|
||||
|
||||
@ -28,7 +28,7 @@ function onRequest(context) {
|
||||
var deviceModule = require("/app/modules/device.js").deviceModule;
|
||||
var device = deviceModule.viewDevice(deviceType, deviceId);
|
||||
if (device && device.status != "error") {
|
||||
return {"device": device.content, "backendApiUri" : devicemgtProps["httpsURL"] + "/"+deviceType+"/", "autoCompleteParams" : autoCompleteParams};
|
||||
return {"device": device.content, "backendApiUri" : "/"+deviceType+"/", "autoCompleteParams" : autoCompleteParams};
|
||||
} else {
|
||||
response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!");
|
||||
exit();
|
||||
|
||||
@ -24,7 +24,7 @@ function onRequest(context) {
|
||||
if (devices) {
|
||||
return {
|
||||
"devices": stringify(devices),
|
||||
"backendApiUri": devicemgtProps["httpsURL"] + "/"+deviceType+"/device/stats/"
|
||||
"backendApiUri": "/"+deviceType+"/device/stats/"
|
||||
};
|
||||
} else if (deviceType != null && deviceType != undefined && deviceId != null && deviceId != undefined) {
|
||||
var deviceModule = require("/app/modules/device.js").deviceModule;
|
||||
@ -32,7 +32,7 @@ function onRequest(context) {
|
||||
if (device && device.status != "error") {
|
||||
return {
|
||||
"device": device.content,
|
||||
"backendApiUri": devicemgtProps["httpsURL"] + "/"+deviceType+"/device/stats/" + deviceId
|
||||
"backendApiUri": "/" + deviceType + "/device/stats/" + deviceId
|
||||
};
|
||||
} else {
|
||||
response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!");
|
||||
|
||||
@ -28,7 +28,7 @@ function onRequest(context) {
|
||||
var deviceModule = require("/app/modules/device.js").deviceModule;
|
||||
var device = deviceModule.viewDevice(deviceType, deviceId);
|
||||
if (device && device.status != "error") {
|
||||
return {"device": device.content, "backendApiUri" : devicemgtProps["httpsURL"] + "/"+deviceType+"/", "autoCompleteParams" : autoCompleteParams};
|
||||
return {"device": device.content, "backendApiUri" : "/"+deviceType+"/", "autoCompleteParams" : autoCompleteParams};
|
||||
} else {
|
||||
response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!");
|
||||
exit();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user