diff --git a/api/v1/index.php b/api/v1/index.php
index 87d6095ad..d5b0655b5 100644
--- a/api/v1/index.php
+++ b/api/v1/index.php
@@ -419,7 +419,7 @@ function authenticate(\Slim\Route $route) {
$response['errorcode']=404;
$response['message']=__("Device not found");
}else{
- $reading=$dev->GetSensorReading();
+ $reading=$dev->GetSensorReading(false);
if(!$reading){
$response['error']=true;
$response['errorcode']=404;
@@ -431,7 +431,7 @@ function authenticate(\Slim\Route $route) {
}
}
- echoResponse($response['errorcode'],$response);
+ echoResponse(200,$response);
});
// this is messy as all hell and i'm still thinking about how to do it better
diff --git a/assets.inc.php b/assets.inc.php
index 91d357ca7..9072a0511 100644
--- a/assets.inc.php
+++ b/assets.inc.php
@@ -3183,9 +3183,9 @@ static function UpdateSensors($CabinetID=null){
return true;
}
- function GetSensorReading(){
+ function GetSensorReading($filterrights=true){
global $dbh;
- if(!$this->getDevice()){
+ if(!$this->getDevice($filterrights)){
return false;
}
// If this isn't a sensor device or doesn't have a template we can't have readings from it
diff --git a/cabnavigator.php b/cabnavigator.php
index 62f4f8d1d..05d487472 100644
--- a/cabnavigator.php
+++ b/cabnavigator.php
@@ -521,18 +521,19 @@ function BuildCabinet($rear=false){
$body.="\t\n";
- $body.='