Exposes clientSDK into RestQuery, RestWrite and rest

This commit is contained in:
Florent Vilmart
2016-07-12 10:06:13 -04:00
parent a040aafcd8
commit 2498a954ce
12 changed files with 57 additions and 29 deletions

View File

@@ -23,13 +23,13 @@ import _ from 'lodash';
// RestWrite will handle objectId, createdAt, and updatedAt for
// everything. It also knows to use triggers and special modifications
// for the _User class.
function RestWrite(config, auth, className, query, data, originalData) {
function RestWrite(config, auth, className, query, data, originalData, clientSDK) {
this.config = config;
this.auth = auth;
this.className = className;
this.clientSDK = clientSDK;
this.storage = {};
this.runOptions = {};
if (!query && data.objectId) {
throw new Parse.Error(Parse.Error.INVALID_KEY_NAME, 'objectId is an invalid field name.');
}