Allows to update permissions without payload
This commit is contained in:
parent
619ff84f01
commit
8f831b2be3
1 changed files with 2 additions and 2 deletions
|
@ -1992,8 +1992,8 @@ App::patch('/v1/database/collections/:collectionId/documents/:documentId')
|
|||
|
||||
$data = (\is_string($data)) ? \json_decode($data, true) : $data; // Cast to JSON array
|
||||
|
||||
if (empty($data)) {
|
||||
throw new Exception('Missing payload', 400);
|
||||
if (empty($data) && empty($read) && empty($write)) {
|
||||
throw new Exception('Missing payload or read/write permissions', 400);
|
||||
}
|
||||
|
||||
if (!\is_array($data)) {
|
||||
|
|
Loading…
Reference in a new issue