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:
parent
5de3a0feaa
commit
21425eb964
|
@ -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())) {
|
||||||
|
|
Loading…
Reference in New Issue