]> source.dussan.org Git - nextcloud-server.git/commitdiff
Return 200 instead of 404 when asking for collections of a resource 14664/head
authorJoas Schilling <coding@schilljs.com>
Mon, 18 Mar 2019 14:13:24 +0000 (15:13 +0100)
committerJulius Härtl <jus@bitgrid.net>
Tue, 19 Mar 2019 12:13:53 +0000 (13:13 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
core/Controller/CollaborationResourcesController.php

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