Implement new invite flow
This commit is contained in:
@@ -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 = {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user