updateInfo: move updateInfo into apps table

this has many advantages:
* easy to deliver the updateInfo via the apps object
* after updating, the task can clear it
* when apps are deleted, the info is automatically gone

otherwise, it's a mess of deps between apps/updater/apptask/rest routes

box update info is still in a file
This commit is contained in:
Girish Ramakrishnan
2025-06-26 15:19:28 +02:00
parent abd640d36b
commit 19c9d7d59d
13 changed files with 141 additions and 149 deletions
+4 -4
View File
@@ -6,10 +6,10 @@ function create() {
const accessToken = localStorage.token;
return {
async info() {
async getBoxUpdate() {
let error, result;
try {
result = await fetcher.get(`${API_ORIGIN}/api/v1/updater/updates`, { access_token: accessToken });
result = await fetcher.get(`${API_ORIGIN}/api/v1/updater/box_update`, { access_token: accessToken });
} catch (e) {
error = e;
}
@@ -39,10 +39,10 @@ function create() {
if (error || result.status !== 200) return [error || result];
return [null];
},
async check() {
async checkBoxUpdate() {
let error, result;
try {
result = await fetcher.post(`${API_ORIGIN}/api/v1/updater/check_for_updates`, {}, { access_token: accessToken });
result = await fetcher.post(`${API_ORIGIN}/api/v1/updater/check_box_update`, {}, { access_token: accessToken });
} catch (e) {
error = e;
}