tkserver 1.7.1 → 1.7.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.
Files changed (2) hide show
  1. package/index.js +1 -11
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -765,8 +765,7 @@ async function checkCaptcha (comment, request) {
765
765
  turnstileToken: comment.turnstileToken,
766
766
  turnstileTokenSecretKey: config.TURNSTILE_SECRET_KEY
767
767
  })
768
- }
769
- if ((!provider || provider === 'Geetest') && config.GEETEST_CAPTCHA_ID && config.GEETEST_CAPTCHA_KEY) {
768
+ } else if ((!provider || provider === 'Geetest') && config.GEETEST_CAPTCHA_ID && config.GEETEST_CAPTCHA_KEY) {
770
769
  await checkGeeTestCaptcha({
771
770
  geeTestCaptchaId: config.GEETEST_CAPTCHA_ID,
772
771
  geeTestCaptchaKey: config.GEETEST_CAPTCHA_KEY,
@@ -775,15 +774,6 @@ async function checkCaptcha (comment, request) {
775
774
  geeTestPassToken: comment.geeTestPassToken,
776
775
  geeTestGenTime: comment.geeTestGenTime
777
776
  })
778
- } else if (config.TURNSTILE_SITE_KEY) {
779
- if (!config.TURNSTILE_SECRET_KEY) {
780
- throw new Error('Turnstile 验证码配置不完整,缺少 TURNSTILE_SECRET_KEY')
781
- }
782
- await checkTurnstileCaptcha({
783
- ip: getIp(request),
784
- turnstileToken: comment.turnstileToken,
785
- turnstileTokenSecretKey: config.TURNSTILE_SECRET_KEY
786
- })
787
777
  }
788
778
  }
789
779
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tkserver",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "description": "A simple comment system.",
5
5
  "keywords": [
6
6
  "twikoo",
@@ -31,7 +31,7 @@
31
31
  "get-user-ip": "^1.0.1",
32
32
  "lokijs": "^1.5.12",
33
33
  "mongodb": "^6.3.0",
34
- "twikoo-func": "1.7.1",
34
+ "twikoo-func": "1.7.2",
35
35
  "uuid": "^8.3.2"
36
36
  }
37
37
  }