Fix ContactsMenuController
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
aa6d8fcdbf
commit
e945f2bc3a
|
@ -54,7 +54,7 @@ class ContactsMenuController extends Controller {
|
||||||
* @NoAdminRequired
|
* @NoAdminRequired
|
||||||
*
|
*
|
||||||
* @param string|null filter
|
* @param string|null filter
|
||||||
* @return JSONResponse
|
* @return \JsonSerializable[]
|
||||||
*/
|
*/
|
||||||
public function index($filter = null) {
|
public function index($filter = null) {
|
||||||
return $this->manager->getEntries($this->userSession->getUser(), $filter);
|
return $this->manager->getEntries($this->userSession->getUser(), $filter);
|
||||||
|
@ -65,15 +65,14 @@ class ContactsMenuController extends Controller {
|
||||||
*
|
*
|
||||||
* @param integer $shareType
|
* @param integer $shareType
|
||||||
* @param string $shareWith
|
* @param string $shareWith
|
||||||
* @return JSONResponse
|
* @return JSONResponse|\JsonSerializable
|
||||||
*/
|
*/
|
||||||
public function findOne($shareType, $shareWith) {
|
public function findOne($shareType, $shareWith) {
|
||||||
$contact = $this->manager->findOne($this->userSession->getUser(), $shareType, $shareWith);
|
$contact = $this->manager->findOne($this->userSession->getUser(), $shareType, $shareWith);
|
||||||
|
|
||||||
if ($contact) {
|
if ($contact) {
|
||||||
return $contact;
|
return $contact;
|
||||||
} else {
|
|
||||||
return new JSONResponse([], Http::STATUS_NOT_FOUND);
|
|
||||||
}
|
}
|
||||||
|
return new JSONResponse([], Http::STATUS_NOT_FOUND);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue