diff --git a/src/js/client.js b/src/js/client.js index 34664b85b..630b68b2e 100644 --- a/src/js/client.js +++ b/src/js/client.js @@ -1535,15 +1535,6 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout return appFound; }; - Client.prototype.sendInvite = function (userId, callback) { - post('/api/v1/users/' + userId + '/send_invite', {}, null, function (error, data, status) { - if (error) return callback(error); - if (status !== 200) return callback(new ClientError(status, data)); - - callback(null, data); - }); - }; - Client.prototype.disableTwoFactorAuthenticationByUserId = function (userId, callback) { post('/api/v1/users/' + userId + '/twofactorauthentication_disable', {}, null, function (error, data, status) { if (error) return callback(error); @@ -1891,6 +1882,24 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout }); }; + Client.prototype.getInviteLink = function (userId, callback) { + get('/api/v1/users/' + userId + '/invite_link', null, function (error, data, status) { + if (error) return callback(error); + if (status !== 200) return callback(new ClientError(status, data)); + + callback(null, data); + }); + }; + + Client.prototype.sendInviteEmail = function (userId, email, callback) { + post('/api/v1/users/' + userId + '/send_invite_email', { email }, null, function (error, data, status) { + if (error) return callback(error); + if (status !== 202) return callback(new ClientError(status, data)); + + callback(null, data); + }); + }; + Client.prototype.setTwoFactorAuthenticationSecret = function (callback) { var data = {}; diff --git a/src/views/users.html b/src/views/users.html index e9d1bf734..d6e81052b 100644 --- a/src/views/users.html +++ b/src/views/users.html @@ -346,7 +346,7 @@
- +
@@ -354,7 +354,7 @@
- + @@ -375,24 +375,28 @@ -