addUser now returns an id

This commit is contained in:
Girish Ramakrishnan
2021-08-10 13:53:28 -07:00
parent 1994ca1ac7
commit 6d7f9b10bd
2 changed files with 6 additions and 6 deletions

View File

@@ -166,7 +166,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
role: $scope.useradd.role
};
Client.createUser(user, function (error, newUserInfo) {
Client.addUser(user, function (error, userId) {
if (error) {
$scope.useradd.busy = false;
@@ -207,9 +207,9 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
var NOOP = function (next) { next(); };
async.series([
Client.setGroups.bind(Client, newUserInfo.id, groupIds),
$scope.useradd.sendInvite ? Client.createInvite.bind(Client, newUserInfo.id) : NOOP,
$scope.useradd.sendInvite ? Client.sendInvite.bind(Client, newUserInfo.id) : NOOP
Client.setGroups.bind(Client, userId, groupIds),
$scope.useradd.sendInvite ? Client.createInvite.bind(Client, userId) : NOOP,
$scope.useradd.sendInvite ? Client.sendInvite.bind(Client, userId) : NOOP
], function (error) {
$scope.useradd.busy = false;