Skip to content

Commit

Permalink
Merge pull request #11 from samilliken/pue-test
Browse files Browse the repository at this point in the history
  • Loading branch information
MorinPierre committed Jul 27, 2015
2 parents 2839eb4 + f0182cc commit 564d573
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions api/v1/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,16 @@ function authenticate(\Slim\Route $route) {
$response['message']=__("No device found with DeviceID").$deviceid;
echoResponse(404,$response);
}else{
if ( is_array( $dev->CustomValues ) ) {
$cattr = new DeviceCustomAttribute();
$newList = array();
foreach ( $dev->CustomValues as $key=>$val ) {
$cattr->AttributeID = $key;
$cattr->GetDeviceCustomAttribute();
$newList[$cattr->Label] = $val;
}
$dev->CustomValues = $newList;
}
$response['error']=false;
$response['errorcode']=200;
$response['device']=$dev;
Expand Down

0 comments on commit 564d573

Please sign in to comment.