Browse Source

FD3-394 log dispositivos

Guillermo Espinoza 7 years ago
parent
commit
ea616acaeb
1 changed files with 5 additions and 6 deletions
  1. 5 6
      Twig/DeviceLogExtension.php

+ 5 - 6
Twig/DeviceLogExtension.php

@@ -49,7 +49,7 @@ class DeviceLogExtension extends \Twig_Extension
      * @param Entity $object
      * @param int $limit
      * @param int $offset
-     * 
+     *
      * @return array
      */
     public function getDeviceLog($object, $limit = 50, $offset = 0)
@@ -59,9 +59,9 @@ class DeviceLogExtension extends \Twig_Extension
             'deviceId' => $object->getId(),
             'disableTenancy' => true
         );
-        
-        $device = $this->webservice->get($this->deviceGetUrl, $filters);
-        
+
+        $device = $this->webservice->getData($this->deviceGetUrl, $filters);
+
         $log = '';
         if (count($device) && isset($device[0])) {
             $filters = array(
@@ -70,8 +70,7 @@ class DeviceLogExtension extends \Twig_Extension
 //            $order = array(
 //                'created' => 'DESC'
 //            );
-            $deviceLogs = $this->webservice->get($this->deviceLogGetUrl, $filters, array(), $limit, $offset);
-            
+            $deviceLogs = $this->webservice->getData($this->deviceLogGetUrl, $filters, array(), $limit, $offset);
             foreach ($deviceLogs as $deviceLog) {
                 unset($deviceLog['device']);
                 $created = new \DateTime($deviceLog['created']);