Use new ownership transfer route

This commit is contained in:
Johannes Zellner
2021-01-15 14:28:52 +01:00
parent 32d7b2fe34
commit 1b09a80caa
2 changed files with 14 additions and 25 deletions
+9
View File
@@ -1702,6 +1702,15 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
});
};
Client.prototype.changeOwnership = function (userId, callback) {
post('/api/v1/users/' + userId + '/make_owner', {}, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 204) return callback(new ClientError(status, data));
callback(null);
});
};
Client.prototype.removeUser = function (userId, callback) {
var config = {
data: {},