Remove mongo object create format from Parse Server (#1516)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user