twikoo-vercel 1.7.5 → 1.7.7
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 +7 -0
- package/package.json +2 -2
package/api/index.js
CHANGED
|
@@ -769,11 +769,18 @@ async function checkCaptcha (comment, request) {
|
|
|
769
769
|
geeTestGenTime: comment.geeTestGenTime
|
|
770
770
|
})
|
|
771
771
|
} else if (provider === 'Cap' && config.CAP_API_ENDPOINT && config.CAP_SECRET_KEY) {
|
|
772
|
+
if (!comment.capToken) {
|
|
773
|
+
throw new Error('验证码 token 缺失,请刷新页面重试')
|
|
774
|
+
}
|
|
772
775
|
await checkCapCaptcha({
|
|
773
776
|
capToken: comment.capToken,
|
|
774
777
|
capSecretKey: config.CAP_SECRET_KEY,
|
|
775
778
|
capApiEndpoint: config.CAP_API_ENDPOINT
|
|
776
779
|
})
|
|
780
|
+
} else if (provider === 'Cap') {
|
|
781
|
+
throw new Error('Cap 验证码配置不完整,请联系管理员')
|
|
782
|
+
} else if (provider) {
|
|
783
|
+
throw new Error(`不支持的验证码类型: ${provider}`)
|
|
777
784
|
}
|
|
778
785
|
}
|
|
779
786
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "twikoo-vercel",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.7",
|
|
4
4
|
"description": "A simple comment system.",
|
|
5
5
|
"author": "imaegoo <hello@imaegoo.com> (https://github.com/imaegoo)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"get-user-ip": "^1.0.1",
|
|
15
15
|
"mongodb": "^6.3.0",
|
|
16
|
-
"twikoo-func": "1.7.
|
|
16
|
+
"twikoo-func": "1.7.7",
|
|
17
17
|
"uuid": "^8.3.2"
|
|
18
18
|
}
|
|
19
19
|
}
|