Ver código fonte

[🚀] 修复captcha

bvbej 9 meses atrás
pai
commit
d8113d0a37
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      pkg/captcha/base64.go

+ 2 - 2
pkg/captcha/base64.go

@@ -55,7 +55,7 @@ func NewStore(cache cache.Repo, ttl time.Duration, namespace string) base64Captc
 var _ Captcha = (*captcha)(nil)
 
 type Captcha interface {
-	Generate() (id, b64s string, err error)
+	Generate() (id, b64s, answer string, err error)
 	Verify(id, value string) bool
 }
 
@@ -87,7 +87,7 @@ func NewDigitCaptcha(store base64Captcha.Store, height, width, length int) Captc
 	}
 }
 
-func (c *captcha) Generate() (id, b64s string, err error) {
+func (c *captcha) Generate() (id, b64s, answer string, err error) {
 	newCaptcha := base64Captcha.NewCaptcha(c.driver, c.store)
 	return newCaptcha.Generate()
 }