Use the new app eventlog route

This commit is contained in:
Girish Ramakrishnan
2021-09-21 19:46:18 -07:00
parent aecba53de5
commit f8ed17dd58
2 changed files with 19 additions and 5 deletions

View File

@@ -2108,6 +2108,23 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
window.location.href = client.apiOrigin + '/api/v1/cloudron/logout?access_token=' + token;
};
Client.prototype.getAppEventLog = function (appId, page, perPage, callback) {
var config = {
params: {
page: page,
per_page: perPage
}
};
get('/api/v1/apps/' + appId + '/eventlog', config, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data.eventlogs);
});
};
Client.prototype.uploadFile = function (appId, file, progressCallback, callback) {
var fd = new FormData();
fd.append('file', file);