update: add policy to update apps separately from platform

This commit is contained in:
Girish Ramakrishnan
2026-03-15 19:09:54 +05:30
parent db974d72d5
commit f334c696cb
24 changed files with 222 additions and 169 deletions
+4 -4
View File
@@ -17,10 +17,10 @@ function create() {
if (error || result.status !== 200) return [error || result];
return [null, result.body.update];
},
async getAutoupdatePattern() {
async getAutoupdateConfig() {
let error, result;
try {
result = await fetcher.get(`${API_ORIGIN}/api/v1/updater/autoupdate_pattern`, { access_token: accessToken });
result = await fetcher.get(`${API_ORIGIN}/api/v1/updater/autoupdate_config`, { access_token: accessToken });
} catch (e) {
error = e;
}
@@ -28,10 +28,10 @@ function create() {
if (error || result.status !== 200) return [error || result];
return [null, result.body];
},
async setAutoupdatePattern(pattern) {
async setAutoupdateConfig(schedule, policy) {
let error, result;
try {
result = await fetcher.post(`${API_ORIGIN}/api/v1/updater/autoupdate_pattern`, { pattern }, { access_token: accessToken });
result = await fetcher.post(`${API_ORIGIN}/api/v1/updater/autoupdate_config`, { schedule, policy }, { access_token: accessToken });
} catch (e) {
error = e;
}