1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-11-29 11:24:11 +01:00

Only return collection on GET.

Opens up for using HEAD to get status.
This commit is contained in:
Thomas Tanghus 2013-05-27 08:04:06 +02:00
parent ae095acb2b
commit dfefa2be55

View File

@ -60,6 +60,7 @@ class AddressBookController extends BaseController {
$response->setETag(md5($lastModified));
}
if($this->request->method === 'GET') {
$contacts = array();
foreach($addressBook->getChildren() as $i => $contact) {
$result = JSONSerializer::serializeContact($contact);
@ -69,6 +70,7 @@ class AddressBookController extends BaseController {
}
}
$response->setParams(array('contacts' => $contacts));
}
return $response;
}