diff --git a/packages/server/src/logic/comment.js b/packages/server/src/logic/comment.js index 156a0ede0ed..b3f9d4d4c90 100644 --- a/packages/server/src/logic/comment.js +++ b/packages/server/src/logic/comment.js @@ -249,17 +249,10 @@ module.exports = class extends Base { */ async putAction() { const { userInfo } = this.ctx.state; - const { like } = this.post(); - - // 1. like - if (think.isEmpty(userInfo) && think.isBoolean(like)) { - this.rules = { - like: { - required: true, - boolean: true, - }, - }; + const data = this.post(); + // 1. like action + if (think.isBoolean(data.like) && Object.keys(data).toString() === 'like') { return; }