add type field to clients table

This commit is contained in:
Girish Ramakrishnan
2015-10-15 16:31:45 -07:00
parent d0dfe1ef7f
commit 9c157246b7
17 changed files with 151 additions and 78 deletions

View File

@@ -340,7 +340,7 @@ function setPassword(userId, newPassword, callback) {
if (error) return callback(new UserError(UserError.INTERNAL_ERROR, error));
// Also generate a token so the new user can get logged in immediately
clientdb.getByAppId('webadmin', function (error, result) {
clientdb.getByAppIdAndType('webadmin', clientdb.TYPE_ADMIN, function (error, result) {
if (error) return callback(new UserError(UserError.INTERNAL_ERROR, error));
var token = tokendb.generateToken();