Fix typo,

- Adds automatic downloadName to match original Parse API
This commit is contained in:
Florent Vilmart
2016-02-19 14:07:12 -05:00
parent 9c477907bf
commit 6e55e59b86
3 changed files with 6 additions and 1 deletions

View File

@@ -182,6 +182,7 @@ describe("test validate_receipt endpoint", () => {
product.set("title", "a new title");
return product.save();
}).then(function(productAgain){
expect(productAgain.get('downloadName')).toEqual(productAgain.get('download').name());
expect(productAgain.get("title")).toEqual("a new title");
done();
}).fail(function(err){

View File

@@ -684,6 +684,10 @@ RestWrite.prototype.runDatabaseOperation = function() {
'cannot modify user ' + this.query.objectId);
}
if (this.className === '_Product' && this.data.download) {
this.data.downloadName = this.data.download.name;
}
// TODO: Add better detection for ACL, ensuring a user can't be locked from
// their own user record.
if (this.data.ACL && this.data.ACL['*unresolved']) {

View File

@@ -67,7 +67,7 @@ var defaultColumns = {
"icon": {type:'File'},
"order": {type:'Number'},
"title": {type:'String'},
"subtile": {type:'String'},
"subtitle": {type:'String'},
}
};