diff --git a/src/api/comment.js b/src/api/comment.js index 98f93a81..3ce3f3b3 100644 --- a/src/api/comment.js +++ b/src/api/comment.js @@ -40,11 +40,8 @@ commentApi.updateStatus = (target, commentId, status) => { commentApi.updateStatusInBatch = (target, ids, status) => { return service({ - url: `${baseUrl}/${target}/comments/status`, - data: { - ids: ids, - status: status - }, + url: `${baseUrl}/${target}/comments/status/${status}`, + data: ids, method: 'put' }) } diff --git a/src/api/post.js b/src/api/post.js index 0ec3c6f7..37a3979a 100644 --- a/src/api/post.js +++ b/src/api/post.js @@ -60,11 +60,8 @@ postApi.updateStatus = (postId, status) => { postApi.updateStatusInBatch = (ids, status) => { return service({ - url: `${baseUrl}/status`, - data: { - ids: ids, - status: status - }, + url: `${baseUrl}/status/${status}`, + data: ids, method: 'put' }) }