resource.js
435 Bytes
import request from '@/utils/request'
export function fetchResourceList(query) {
return request({
url: '/api/v1/resources',
method: 'get',
params: query
})
}
export function createResource(data) {
return request({
url: '/api/v1/resources',
method: 'post',
data
})
}
export function updateResource(id, data) {
return request({
url: `/api/v1/resources/${id}`,
method: 'post',
data
})
}