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

@@ -127,6 +127,15 @@ export class MongoStorageAdapter {
.then(schemaCollection => schemaCollection.updateSchema(className, schemaUpdate));
}
// TODO: As yet not particularly well specified. Creates an object. Does it really need the schema?
// or can it fetch the schema itself? Also the schema is not currently a Parse format schema, and it
// should be, if we are passing it at all.
createObject(className, object, schema) {
const mongoObject = transform.parseObjectToMongoObject(schema, className, object);
return this.adaptiveCollection(className)
.then(collection => collection.insertOne(mongoObject));
}
get transform() {
return transform;
}