Remove validate parameter from deleteObjectsByQuery

This commit is contained in:
Drew Gross
2016-05-18 18:35:02 -07:00
parent 643bdc8227
commit 5165c80570
2 changed files with 3 additions and 3 deletions

View File

@@ -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);

View File

@@ -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) {