From 5165c80570477f1ad37dca74491cdd74254ee81b Mon Sep 17 00:00:00 2001 From: Drew Gross Date: Wed, 18 May 2016 18:35:02 -0700 Subject: [PATCH] Remove validate parameter from deleteObjectsByQuery --- src/Adapters/Storage/Mongo/MongoStorageAdapter.js | 4 ++-- src/Controllers/DatabaseController.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Adapters/Storage/Mongo/MongoStorageAdapter.js b/src/Adapters/Storage/Mongo/MongoStorageAdapter.js index c860819d..b47c32a6 100644 --- a/src/Adapters/Storage/Mongo/MongoStorageAdapter.js +++ b/src/Adapters/Storage/Mongo/MongoStorageAdapter.js @@ -181,8 +181,8 @@ export class MongoStorageAdapter { // If no objects match, reject with OBJECT_NOT_FOUND. If objects are found and deleted, resolve with undefined. // If there is some other error, reject with INTERNAL_SERVER_ERROR. - // Currently accepts validate for legacy reasons. Currently accepts the schema, that may not actually be necessary. - deleteObjectsByQuery(className, query, validate, schema) { + // Currently accepts the schema, that may not actually be necessary. + deleteObjectsByQuery(className, query, schema) { return this.adaptiveCollection(className) .then(collection => { let mongoWhere = transform.transformWhere(className, query, schema); diff --git a/src/Controllers/DatabaseController.js b/src/Controllers/DatabaseController.js index 0af8fb92..522a2f14 100644 --- a/src/Controllers/DatabaseController.js +++ b/src/Controllers/DatabaseController.js @@ -368,7 +368,7 @@ DatabaseController.prototype.destroy = function(className, query, { acl } = {}) } throw error; }) - .then(parseFormatSchema => this.adapter.deleteObjectsByQuery(className, query, !this.skipValidation, parseFormatSchema)) + .then(parseFormatSchema => this.adapter.deleteObjectsByQuery(className, query, parseFormatSchema)) .catch(error => { // When deleting sessions while changing passwords, don't throw an error if they don't have any sessions. if (className === "_Session" && error.code === Parse.Error.OBJECT_NOT_FOUND) {