From a5c3e978e8b826f462b266468f73aa3fee0e69ec Mon Sep 17 00:00:00 2001 From: eldadfux Date: Sun, 15 Sep 2019 19:50:42 +0300 Subject: [PATCH] Fixed missing collection error when creating a new document --- app/controllers/database.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/database.php b/app/controllers/database.php index c798fbe64..c64813157 100644 --- a/app/controllers/database.php +++ b/app/controllers/database.php @@ -385,6 +385,7 @@ $utopia->post('/v1/database/:collectionId/documents') throw new Exception('Collection not found', 404); } + $data['$collection'] = $collectionId; // Adding this param to make API easier for developers $data['$permissions'] = [ 'read' => $read, 'write' => $write,