mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-09-14 12:49:56 +00:00
feat: add ability to refresh databases through web interface
This commit is contained in:
@ -73,6 +73,19 @@
|
||||
doPackageAction(url, currentSelection, repository, onSuccess, onFailure);
|
||||
}
|
||||
|
||||
function refreshDatabases() {
|
||||
const onSuccess = _ => "Pacman database update has been requested";
|
||||
const onFailure = error => `Could not update pacman databases: ${error}`;
|
||||
const parameters = {
|
||||
refresh: true,
|
||||
aur: false,
|
||||
local: false,
|
||||
manual: false,
|
||||
};
|
||||
|
||||
doPackageAction("/api/v1/service/update", [], repository, onSuccess, onFailure, parameters);
|
||||
}
|
||||
|
||||
function reload() {
|
||||
table.bootstrapTable("showLoading");
|
||||
|
||||
|
Reference in New Issue
Block a user