Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
lizheming authored Aug 25, 2024
1 parent 53b1384 commit c0af42f
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions packages/server/src/logic/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit c0af42f

Please sign in to comment.