mirror of https://github.com/halo-dev/halo-admin
refactor: post status update api
parent
58899d4486
commit
7fd5f91e15
|
@ -40,11 +40,8 @@ commentApi.updateStatus = (target, commentId, status) => {
|
||||||
|
|
||||||
commentApi.updateStatusInBatch = (target, ids, status) => {
|
commentApi.updateStatusInBatch = (target, ids, status) => {
|
||||||
return service({
|
return service({
|
||||||
url: `${baseUrl}/${target}/comments/status`,
|
url: `${baseUrl}/${target}/comments/status/${status}`,
|
||||||
data: {
|
data: ids,
|
||||||
ids: ids,
|
|
||||||
status: status
|
|
||||||
},
|
|
||||||
method: 'put'
|
method: 'put'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,11 +60,8 @@ postApi.updateStatus = (postId, status) => {
|
||||||
|
|
||||||
postApi.updateStatusInBatch = (ids, status) => {
|
postApi.updateStatusInBatch = (ids, status) => {
|
||||||
return service({
|
return service({
|
||||||
url: `${baseUrl}/status`,
|
url: `${baseUrl}/status/${status}`,
|
||||||
data: {
|
data: ids,
|
||||||
ids: ids,
|
|
||||||
status: status
|
|
||||||
},
|
|
||||||
method: 'put'
|
method: 'put'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue