Merge pull request #515 from flovilmart/receipt-validation
Adds receipt validation endpoint
This commit is contained in:
@@ -112,7 +112,7 @@ RestWrite.prototype.getUserAndRoleACL = function() {
|
||||
|
||||
// Validates this operation against the schema.
|
||||
RestWrite.prototype.validateSchema = function() {
|
||||
return this.config.database.validateObject(this.className, this.data);
|
||||
return this.config.database.validateObject(this.className, this.data, this.query);
|
||||
};
|
||||
|
||||
// Runs any beforeSave triggers against this operation.
|
||||
@@ -705,6 +705,10 @@ RestWrite.prototype.runDatabaseOperation = function() {
|
||||
throw new Parse.Error(Parse.Error.SESSION_MISSING,
|
||||
'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.
|
||||
|
||||
Reference in New Issue
Block a user