remove updating clients

clients are immutable
This commit is contained in:
Girish Ramakrishnan
2015-10-15 16:08:14 -07:00
parent 63edbae1be
commit a9ccc7e2aa
6 changed files with 0 additions and 249 deletions

View File

@@ -5,7 +5,6 @@ exports = module.exports = {
add: add,
get: get,
update: update,
del: del,
getAllWithDetailsByUserId: getAllWithDetailsByUserId,
getClientTokensByUserId: getClientTokensByUserId,
@@ -92,23 +91,6 @@ function get(id, callback) {
});
}
// we only allow appIdentifier and redirectURI to be updated
function update(id, appId, redirectURI, callback) {
assert.strictEqual(typeof id, 'string');
assert.strictEqual(typeof appId, 'string');
assert.strictEqual(typeof redirectURI, 'string');
assert.strictEqual(typeof callback, 'function');
clientdb.get(id, function (error, result) {
if (error) return callback(error);
clientdb.update(id, appId, result.clientSecret, redirectURI, result.scope, function (error, result) {
if (error) return callback(error);
callback(null, result);
});
});
}
function del(id, callback) {
assert.strictEqual(typeof id, 'string');
assert.strictEqual(typeof callback, 'function');