Fixed Bugs ACL

dependabot/npm_and_yarn/mixin-deep-1.3.2
17shou_VIP 5 years ago committed by GitHub
parent db68b58150
commit 1f309a474b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      utilities/check-spam.js

@ -9,6 +9,7 @@ const akismetClient = akismet.client({
exports.checkSpam = (comment, ip)=> {
if (process.env.AKISMET_KEY === 'MANUAL_REVIEW') {
console.log('已使用人工审核模式,评论审核后才会发表~');
comment.setACL(new AV.ACL({"*":{"read":false}}));
comment.set('isSpam', true);
comment.save();
return;
@ -39,6 +40,7 @@ exports.checkSpam = (comment, ip)=> {
// comment.destroy();
} else {
comment.set('isSpam', false);
comment.setACL(new AV.ACL({"*":{"read":true}}));
comment.save();
console.log('垃圾评论检测完成,放行~');
}

Loading…
Cancel
Save