refactor: dbm

This commit is contained in:
meilin.huang
2024-12-08 13:04:23 +08:00
parent ebc89e056f
commit e56788af3e
152 changed files with 4273 additions and 3715 deletions

View File

@@ -0,0 +1,14 @@
package api
import (
"mayfly-go/internal/auth/pkg/captcha"
"mayfly-go/pkg/biz"
"mayfly-go/pkg/req"
"mayfly-go/pkg/utils/collx"
)
func GenerateCaptcha(rc *req.Ctx) {
id, image, err := captcha.Generate()
biz.ErrIsNilAppendErr(err, "failed to generate the CAPTCHA: %s")
rc.ResData = collx.M{"base64Captcha": image, "cid": id}
}