Add client API to disable user 2fa

This commit is contained in:
Girish Ramakrishnan
2021-04-14 20:58:43 -07:00
parent 09368dd267
commit d0f0dc7339

View File

@@ -1525,6 +1525,15 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
});
};
Client.prototype.disableTwoFactorAuthenticationByUserId = function (userId, callback) {
post('/api/v1/users/' + userId + '/twofactorauthentication_disable', {}, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data);
});
};
Client.prototype.setup = function (data, callback) {
post('/api/v1/cloudron/setup', data, null, function (error, data, status) {
if (error) return callback(error);