Update turnstile-check.go

This commit is contained in:
analogpvt 2023-05-19 23:18:18 +05:30 committed by GitHub
parent f86b9139f3
commit c19ac576d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,7 @@ func TurnstileCheck() gin.HandlerFunc {
if response == "" { if response == "" {
c.JSON(http.StatusOK, gin.H{ c.JSON(http.StatusOK, gin.H{
"success": false, "success": false,
"message": "Turnstile token 为空", "message": "Turnstile token is empty",
}) })
c.Abort() c.Abort()
return return
@ -60,7 +60,7 @@ func TurnstileCheck() gin.HandlerFunc {
if !res.Success { if !res.Success {
c.JSON(http.StatusOK, gin.H{ c.JSON(http.StatusOK, gin.H{
"success": false, "success": false,
"message": "Turnstile 校验失败,请刷新重试", "message": "Turnstile Verification failed, please refresh and try again.",
}) })
c.Abort() c.Abort()
return return
@ -69,7 +69,7 @@ func TurnstileCheck() gin.HandlerFunc {
err = session.Save() err = session.Save()
if err != nil { if err != nil {
c.JSON(http.StatusOK, gin.H{ c.JSON(http.StatusOK, gin.H{
"message": "无法保存会话信息,请重试", "message": "Unable to save session information, please try again.",
"success": false, "success": false,
}) })
return return