Implement update dialog

This commit is contained in:
Johannes Zellner
2025-06-30 17:35:01 +02:00
parent a0d96d5a74
commit 8e18a5fb4c
2 changed files with 135 additions and 17 deletions
+10
View File
@@ -61,7 +61,17 @@ function create() {
if (error || result.status !== 200) return [error || result];
return [null];
},
async update(skipBackup = false) {
let error, result;
try {
result = await fetcher.post(`${API_ORIGIN}/api/v1/updater/box_update`, { skipBackup }, { access_token: accessToken });
} catch (e) {
error = e;
}
if (error || result.status !== 202) return [error || result];
return [null, result.body.taskId];
},
};
}