diff --git a/sdk/pkg/captcha/captcha.go b/sdk/pkg/captcha/captcha.go index 845a2577..491fcc5b 100644 --- a/sdk/pkg/captcha/captcha.go +++ b/sdk/pkg/captcha/captcha.go @@ -24,7 +24,7 @@ type configJsonBody struct { DriverDigit *base64Captcha.DriverDigit } -func DriverStringFunc() (id, b64s string, err error) { +func DriverStringFunc() (id, b64s, answer string, err error) { e := configJsonBody{} e.Id = uuid.New().String() e.DriverString = base64Captcha.NewDriverString(46, 140, 2, 2, 4, "234567890abcdefghjkmnpqrstuvwxyz", &color.RGBA{240, 240, 246, 246}, nil, []string{"wqy-microhei.ttc"}) @@ -33,7 +33,7 @@ func DriverStringFunc() (id, b64s string, err error) { return captcha.Generate() } -func DriverDigitFunc() (id, b64s string, err error) { +func DriverDigitFunc() (id, b64s, answer string, err error) { e := configJsonBody{} e.Id = uuid.New().String() e.DriverDigit = base64Captcha.NewDriverDigit(80, 240, 4, 0.7, 80)