Files
mayfly-go/server/internal/sys/api/captcha.go
meilin.huang d300f604f1 review
2023-10-12 12:14:56 +08:00

13 lines
228 B
Go

package api
import (
"mayfly-go/pkg/captcha"
"mayfly-go/pkg/req"
"mayfly-go/pkg/utils/collx"
)
func GenerateCaptcha(rc *req.Ctx) {
id, image := captcha.Generate()
rc.ResData = collx.M{"base64Captcha": image, "cid": id}
}