Add applink removal UI

This commit is contained in:
Johannes Zellner
2022-07-07 16:25:04 +02:00
parent 2cbb23a8d6
commit 0474208208
3 changed files with 70 additions and 1 deletions

View File

@@ -1853,6 +1853,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
// amend properties to mimick full app
data.applinks.forEach(function (applink) {
applink.type = 'applink';
applink.fqdn = applink.upstreamUri; // this fqdn may contain the protocol!
applink.manifest = { addons: {}};
applink.installationState = ISTATES.INSTALLED;
@@ -1879,6 +1880,15 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
});
};
Client.prototype.removeApplink = function (id, callback) {
del('/api/v1/applinks/' + id, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 204) return callback(new ClientError(status, data));
callback(null);
});
};
Client.prototype.addUser = function (user, callback) {
var data = {
email: user.email,