Add file removal functionality

This commit is contained in:
Johannes Zellner
2020-07-09 11:00:11 +02:00
parent 7c2ab4e5bd
commit c674d679bd
3 changed files with 70 additions and 10 deletions
+9
View File
@@ -2394,6 +2394,15 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
});
};
Client.prototype.filesRemove = function (appId, path, callback) {
del('/api/v1/apps/' + appId + '/files/' + path, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
callback(null, data);
});
};
client = new Client();
return client;
}]);