Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Commit

Permalink
bump captcha handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio committed Jul 1, 2023
1 parent 1d73dff commit 28f32cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions captcha.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ func captchaStart(c *gin.Context) {
}
session, err := funcaptcha.StartChallenge(token, hex)
if err != nil {
c.JSON(500, gin.H{"error": err.Error()})
c.JSON(500, gin.H{"error": "unable to log requests"})
return
}
err = session.RequestChallenge(false)
if err != nil {
c.JSON(500, gin.H{"error": err.Error()})
c.JSON(500, gin.H{"error": "failed to request challenge"})
return
}
// Get form data (check if download_images is true)
Expand All @@ -35,7 +35,7 @@ func captchaStart(c *gin.Context) {
// Get Base64 encoded image
images, err = funcaptcha.DownloadChallenge(session.ConciseChallenge.URLs, true)
if err != nil {
c.JSON(500, gin.H{"error": err.Error()})
c.JSON(500, gin.H{"error": "failed to download images"})
return
}
}
Expand Down

0 comments on commit 28f32cd

Please sign in to comment.