添加自动更新功能
This commit is contained in:
27
admin-frontend/src/api/update.js
Normal file
27
admin-frontend/src/api/update.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import { api } from './client'
|
||||
|
||||
export async function fetchUpdateStatus() {
|
||||
const { data } = await api.get('/update/status')
|
||||
return data
|
||||
}
|
||||
|
||||
export async function fetchUpdateResult() {
|
||||
const { data } = await api.get('/update/result')
|
||||
return data
|
||||
}
|
||||
|
||||
export async function fetchUpdateLog(params = {}) {
|
||||
const { data } = await api.get('/update/log', { params })
|
||||
return data
|
||||
}
|
||||
|
||||
export async function requestUpdateCheck() {
|
||||
const { data } = await api.post('/update/check', {})
|
||||
return data
|
||||
}
|
||||
|
||||
export async function requestUpdateRun() {
|
||||
const { data } = await api.post('/update/run', {})
|
||||
return data
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user