Skip to content

是否可以做到登录用户评论无需审核,匿名用户需要审核 #1563

Answered by lizheming
AnzhiZhang asked this question in Q&A
Discussion options

You must be logged in to vote

preSave hooks 可以自行实现:

preSave(comment) {
  const { userInfo } = this.ctx.state;
  comment.status = think.isEmpty(userInfo) ? 'waiting' : 'approved';
}

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Maxlife-God
Comment options

@lizheming
Comment options

Answer selected by lizheming
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants