Skip to content

Commit 2d4c770

Browse files
committed
destructure acl
1 parent 48c2d3a commit 2d4c770

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Controllers/DatabaseController.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,8 @@ DatabaseController.prototype.removeRelation = function(key, fromClassName, fromI
284284
// acl: a list of strings. If the object to be updated has an ACL,
285285
// one of the provided strings must provide the caller with
286286
// write permissions.
287-
DatabaseController.prototype.destroy = function(className, query, options = {}) {
288-
const isMaster = !('acl' in options);
289-
const { acl } = options;
287+
DatabaseController.prototype.destroy = function(className, query, { acl } = {}) {
288+
const isMaster = acl === undefined;
290289
const aclGroup = acl || [];
291290

292291
return this.loadSchema()

0 commit comments

Comments
 (0)