archive: implement unarchive

made a separate route instead of reusing install route. this was
because we want to copy over all the old app config as much as
possible.
This commit is contained in:
Girish Ramakrishnan
2024-12-10 14:46:30 +01:00
parent e168be6d97
commit 0e181cdc82
9 changed files with 173 additions and 90 deletions

View File

@@ -1524,6 +1524,16 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
});
};
Client.prototype.unarchiveApp = function (archiveId, data, callback) {
post('/api/v1/archives/' + archiveId + '/unarchive', data, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 202) return callback(new ClientError(status, data));
callback(null, data);
});
};
Client.prototype.getBackups = function (callback) {
var page = 1;
var perPage = 100;