Fix purge

This commit is contained in:
Drew Gross
2016-06-15 15:01:21 -07:00
parent f23d80ec9a
commit 8130658583
2 changed files with 3 additions and 7 deletions

View File

@@ -100,12 +100,8 @@ DatabaseController.prototype.collectionExists = function(className) {
DatabaseController.prototype.purgeCollection = function(className) {
return this.loadSchema()
.then((schema) => {
schema.getOneSchema(className)
})
.then((schema) => {
this.adapter.deleteObjectsByQuery(className, {}, schema);
});
.then(schemaController => schemaController.getOneSchema(className))
.then(schema => this.adapter.deleteObjectsByQuery(className, schema, {}));
};
DatabaseController.prototype.validateClassName = function(className) {