Prechádzať zdrojové kódy

[🚀] 修复captcha

bvbej 9 mesiacov pred
rodič
commit
d8113d0a37
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  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()
 }