Skip to content

Commit

Permalink
return ip correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
TrystanLea committed Jul 8, 2018
1 parent c528702 commit 89c9c6b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion device_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ public function get_auth_request() {
return array("success"=>false, "message"=>"Unable to handle authentication requests without redis");
}
if ($device_auth = $this->redis->get("device:auth:request")) {
return array_merge(array("success"=>true, json_decode($device_auth)));
$device_auth = json_decode($device_auth);
return array_merge(array("success"=>true, "ip"=>$device_auth->ip));
} else {
return array("success"=>true, "message"=>"No authentication request registered");
}
Expand Down

0 comments on commit 89c9c6b

Please sign in to comment.