Fix typo,
- Adds automatic downloadName to match original Parse API
This commit is contained in:
@@ -182,6 +182,7 @@ describe("test validate_receipt endpoint", () => {
|
|||||||
product.set("title", "a new title");
|
product.set("title", "a new title");
|
||||||
return product.save();
|
return product.save();
|
||||||
}).then(function(productAgain){
|
}).then(function(productAgain){
|
||||||
|
expect(productAgain.get('downloadName')).toEqual(productAgain.get('download').name());
|
||||||
expect(productAgain.get("title")).toEqual("a new title");
|
expect(productAgain.get("title")).toEqual("a new title");
|
||||||
done();
|
done();
|
||||||
}).fail(function(err){
|
}).fail(function(err){
|
||||||
|
|||||||
@@ -683,6 +683,10 @@ RestWrite.prototype.runDatabaseOperation = function() {
|
|||||||
throw new Parse.Error(Parse.Error.SESSION_MISSING,
|
throw new Parse.Error(Parse.Error.SESSION_MISSING,
|
||||||
'cannot modify user ' + this.query.objectId);
|
'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
|
// TODO: Add better detection for ACL, ensuring a user can't be locked from
|
||||||
// their own user record.
|
// their own user record.
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ var defaultColumns = {
|
|||||||
"icon": {type:'File'},
|
"icon": {type:'File'},
|
||||||
"order": {type:'Number'},
|
"order": {type:'Number'},
|
||||||
"title": {type:'String'},
|
"title": {type:'String'},
|
||||||
"subtile": {type:'String'},
|
"subtitle": {type:'String'},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user