backups: add stop_integrity_check route
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user