twikoo-vercel 1.6.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/index.js +2 -2
- package/package.json +2 -2
package/api/index.js
CHANGED
|
@@ -594,14 +594,14 @@ async function getParentComment (currentComment) {
|
|
|
594
594
|
const parentComment = await db
|
|
595
595
|
.collection('comment')
|
|
596
596
|
.findOne({ _id: currentComment.pid })
|
|
597
|
-
return parentComment
|
|
597
|
+
return parentComment
|
|
598
598
|
}
|
|
599
599
|
|
|
600
600
|
// 异步垃圾检测、发送评论通知
|
|
601
601
|
async function postSubmit (comment, request) {
|
|
602
602
|
if (!isRecursion(request)) return { code: RES_CODE.FORBIDDEN }
|
|
603
603
|
// 垃圾检测
|
|
604
|
-
const isSpam = await postCheckSpam(comment)
|
|
604
|
+
const isSpam = await postCheckSpam(comment, config)
|
|
605
605
|
await saveSpamCheckResult(comment, isSpam)
|
|
606
606
|
// 发送通知
|
|
607
607
|
await sendNotice(comment, config, getParentComment)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "twikoo-vercel",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"description": "A simple comment system.",
|
|
5
5
|
"author": "imaegoo <hello@imaegoo.com> (https://github.com/imaegoo)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"homepage": "https://twikoo.js.org",
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"mongodb": "^3.6.3",
|
|
15
|
-
"twikoo-func": "1.6.
|
|
15
|
+
"twikoo-func": "1.6.2",
|
|
16
16
|
"uuid": "^8.3.2"
|
|
17
17
|
}
|
|
18
18
|
}
|