Add halo backup api

pull/59/head
johnniang 2019-11-18 02:45:39 +08:00
parent 79350dcb34
commit 463f953286
1 changed files with 25 additions and 0 deletions

View File

@ -15,4 +15,29 @@ backupApi.importMarkdown = (formData, uploadProgress, cancelToken) => {
})
}
backupApi.backupHalo = () => {
return service({
url: `${baseUrl}/halo`,
method: 'post',
timeout: 8640000 // 24 hours
})
}
backupApi.listHaloBackups = () => {
return service({
url: `${baseUrl}/halo`,
method: 'get'
})
}
backupApi.deleteHaloBackup = filename => {
return service({
url: `${baseUrl}/halo`,
params: {
filename: filename
},
method: 'delete'
})
}
export default backupApi