浏览代码

[🚀] 修复captcha

bvbej 9 月之前
父节点
当前提交
d8113d0a37
共有 1 个文件被更改,包括 2 次插入2 次删除
  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()
 }