Return 200 instead of 404 when asking for collections of a resource

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2019-03-18 15:13:24 +01:00 committed by Julius Härtl
parent 5de3a0feaa
commit 21425eb964
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,7 @@ class CollaborationResourcesController extends OCSController {
try { try {
$resource = $this->manager->getResourceForUser($resourceType, $resourceId, $this->userSession->getUser()); $resource = $this->manager->getResourceForUser($resourceType, $resourceId, $this->userSession->getUser());
} catch (ResourceException $e) { } catch (ResourceException $e) {
return new DataResponse([], Http::STATUS_NOT_FOUND); $resource = $this->manager->createResource($resourceType, $resourceId);
} }
if (!$resource->canAccess($this->userSession->getUser())) { if (!$resource->canAccess($this->userSession->getUser())) {