You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by ro...@apache.org on 2014/12/11 02:42:03 UTC
[1/2] incubator-usergrid git commit: delete getOnExist from data sent
to server
Repository: incubator-usergrid
Updated Branches:
refs/heads/master 127df0397 -> 5b4fe7f04
delete getOnExist from data sent to server
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/452586bd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/452586bd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/452586bd
Branch: refs/heads/master
Commit: 452586bd7cbae425ba8b940ccfa225fa9c6cb9e8
Parents: 55e817c
Author: Erich Buri <er...@gmail.com>
Authored: Wed Nov 19 17:50:32 2014 +0100
Committer: Erich Buri <er...@gmail.com>
Committed: Wed Nov 19 17:50:32 2014 +0100
----------------------------------------------------------------------
sdks/nodejs/lib/usergrid.js | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/452586bd/sdks/nodejs/lib/usergrid.js
----------------------------------------------------------------------
diff --git a/sdks/nodejs/lib/usergrid.js b/sdks/nodejs/lib/usergrid.js
index 284deee..61dfad7 100755
--- a/sdks/nodejs/lib/usergrid.js
+++ b/sdks/nodejs/lib/usergrid.js
@@ -193,6 +193,7 @@ var AUTH_NONE = 'NONE';
*/
Usergrid.Client.prototype.createGroup = function(options, callback) {
var getOnExist = options.getOnExist || false;
+ delete options.getOnExist;
var options = {
path: options.path,
@@ -244,6 +245,8 @@ var AUTH_NONE = 'NONE';
});
*/
var getOnExist = options.getOnExist || false; //if true, will return entity if one already exists
+ delete options.getOnExist;
+
var options = {
client:this,
data:options
@@ -1359,30 +1362,30 @@ var AUTH_NONE = 'NONE';
}
Usergrid.Client.prototype.createRole = function(roleName, permissions, callback) {
-
+
var self = this;
var options = {
type: 'role',
- name: roleName
+ name: roleName
};
this.createEntity(options, function(err, entity, response) {
if (err) {
- callback (err, response, self);
+ callback (err, response, self);
} else {
entity.assignPermissions(permissions, function (err, data) {
if (err) {
- callback (err, response, self);
+ callback (err, response, self);
} else {
callback (err, data, data.data);
}
})
- }
+ }
});
};
Usergrid.Entity.prototype.assignRole = function(roleName, callback) {
-
+
var self = this;
var type = self.get('type');
var collection = type + 's';
@@ -1403,20 +1406,20 @@ var AUTH_NONE = 'NONE';
var endpoint = 'roles/' + roleName + '/' + collection + '/' + entityID;
var options = {
method: 'POST',
- endpoint: endpoint
+ endpoint: endpoint
};
this._client.request(options, function(err, response) {
if (err) {
console.log('Could not assign role.');
- }
+ }
callback (err, response, self);
});
};
Usergrid.Entity.prototype.removeRole = function(roleName, callback) {
-
+
var self = this;
var type = self.get('type');
var collection = type + 's';
@@ -1437,13 +1440,13 @@ var AUTH_NONE = 'NONE';
var endpoint = 'roles/' + roleName + '/' + collection + '/' + entityID;
var options = {
method: 'DELETE',
- endpoint: endpoint
+ endpoint: endpoint
};
this._client.request(options, function(err, response) {
if (err) {
console.log('Could not assign role.');
- }
+ }
callback (err, response, self);
});
[2/2] incubator-usergrid git commit: Merge remote-tracking branch
'eburi/remove-getOnExist' into apache_usergrid/master
Posted by ro...@apache.org.
Merge remote-tracking branch 'eburi/remove-getOnExist' into apache_usergrid/master
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/5b4fe7f0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/5b4fe7f0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/5b4fe7f0
Branch: refs/heads/master
Commit: 5b4fe7f04c75535ac6c6444f41b01e8c043ed39e
Parents: 127df03 452586b
Author: Rod Simpson <ro...@apigee.com>
Authored: Wed Dec 10 18:41:53 2014 -0700
Committer: Rod Simpson <ro...@apigee.com>
Committed: Wed Dec 10 18:41:53 2014 -0700
----------------------------------------------------------------------
sdks/nodejs/lib/usergrid.js | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b4fe7f0/sdks/nodejs/lib/usergrid.js
----------------------------------------------------------------------