refactor: post status update api

pull/59/head
ruibaby 2019-12-12 20:11:43 +08:00
parent 58899d4486
commit 7fd5f91e15
2 changed files with 4 additions and 10 deletions

View File

@ -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'
}) })
} }

View File

@ -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'
}) })
} }