Remove mongo object create format from Parse Server (#1516)

This commit is contained in:
Drew
2016-04-18 09:45:48 -07:00
committed by Florent Vilmart
parent c57c6b33b1
commit ac839f75c7
4 changed files with 24 additions and 21 deletions

View File

@@ -344,11 +344,7 @@ DatabaseController.prototype.create = function(className, object, options = {})
return Promise.resolve();
})
.then(() => this.handleRelationUpdates(className, null, object))
.then(() => this.adapter.adaptiveCollection(className))
.then(coll => {
var mongoObject = this.transform.transformCreate(schema, className, object);
return coll.insertOne(mongoObject);
})
.then(() => this.adapter.createObject(className, object, schema))
.then(result => {
return sanitizeDatabaseResult(originalObject, result.ops[0]);
});