Browse Source

Bugfix: edit ressource

andre 2 years ago
parent
commit
b2088d79b3
1 changed files with 4 additions and 4 deletions
  1. 4 4
      app/Libs/Zimbra/Components/Api/Soap/Repository/Ressources.php

+ 4 - 4
app/Libs/Zimbra/Components/Api/Soap/Repository/Ressources.php

@@ -31,7 +31,7 @@ class Ressources extends AbstractRepository
         $domain->setName($name);
 
         $result = $this->getClient()->ressource->getAllByDomain($domain);
-        $ressources = $result->getResponseBody()['GETALLCALENDARRESOURCESRESPONSE']['CALRESOURCE'];
+        $ressources = $result->getResponseBody()['GETCALENDARRESOURCERESPONSE']['CALRESOURCE'];
         /**
          * API return one or araay with ressources
          */
@@ -105,8 +105,8 @@ class Ressources extends AbstractRepository
         if(!$result->getLastError())
         {
             $body = $result->getResponseBody();
-            $result =  $ressource->fill($body['GETRESSOURCEINFORESPONSE']);
-            $result->setName($body['GETRESSOURCEINFORESPONSE']['NAME']['DATA']);
+            $result =  $ressource->fill($body['GETCALENDARRESOURCERESPONSE']);
+            $result->setName($body['GETCALENDARRESOURCERESPONSE']['NAME']['DATA']);
             return $result;
         }
 
@@ -135,7 +135,7 @@ class Ressources extends AbstractRepository
         if(!$result->getLastError())
         {
             $body = $result->getResponseBody();
-            return $ressource->fill($body['GETRESSOURCERESPONSE']['RESSOURCE']);
+            return $ressource->fill($body['GETCALENDARRESOURCERESPONSE']['CALRESOURCE']);
         }
 
         return $result;