mirror of https://github.com/halo-dev/halo-admin
Add halo backup api
parent
79350dcb34
commit
463f953286
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue