remove app ownerId

this is unused
This commit is contained in:
Girish Ramakrishnan
2019-07-02 20:22:17 -07:00
parent 10e2817257
commit e7127df30d
16 changed files with 72 additions and 276 deletions

View File

@@ -10,8 +10,7 @@ exports = module.exports = {
verifyPassword: verifyPassword,
createInvite: createInvite,
sendInvite: sendInvite,
setGroups: setGroups,
transferOwnership: transferOwnership
setGroups: setGroups
};
var assert = require('assert'),
@@ -179,20 +178,6 @@ function setGroups(req, res, next) {
});
}
function transferOwnership(req, res, next) {
assert.strictEqual(typeof req.body, 'object');
assert.strictEqual(typeof req.params.userId, 'string');
if (typeof req.body.ownerId !== 'string') return next(new HttpError(400, 'ownerId must be a string'));
users.transferOwnership(req.params.userId, req.body.ownerId, auditSource.fromRequest(req), function (error) {
if (error && error.reason === UsersError.NOT_FOUND) return next(new HttpError(404, 'No such user'));
if (error) return next(new HttpError(500, error));
next(new HttpSuccess(200, {}));
});
}
function changePassword(req, res, next) {
assert.strictEqual(typeof req.body, 'object');
assert.strictEqual(typeof req.params.userId, 'string');