backups: add stop_integrity_check route

This commit is contained in:
Girish Ramakrishnan
2026-02-09 21:58:40 +01:00
parent 26a3cf79c5
commit 93a0063941
6 changed files with 58 additions and 14 deletions
+13 -2
View File
@@ -32,10 +32,10 @@ function create() {
if (error || result.status !== 200) return [error || result];
return [null];
},
async checkIntegrity(id) {
async startIntegrityCheck(id) {
let error, result;
try {
result = await fetcher.post(`${API_ORIGIN}/api/v1/backups/${id}/check_integrity`, {}, { access_token: accessToken });
result = await fetcher.post(`${API_ORIGIN}/api/v1/backups/${id}/start_integrity_check`, {}, { access_token: accessToken });
} catch (e) {
error = e;
}
@@ -43,6 +43,17 @@ function create() {
if (error || result.status !== 201) return [error || result];
return [null, result.body.taskId];
},
async stopIntegrityCheck(id) {
let error, result;
try {
result = await fetcher.post(`${API_ORIGIN}/api/v1/backups/${id}/stop_integrity_check`, {}, { access_token: accessToken });
} catch (e) {
error = e;
}
if (error || result.status !== 204) return [error || result];
return [null];
},
async get(id) {
let error, result;
try {