You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
680 B
Go
32 lines
680 B
Go
package captcha
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"git.noahlan.cn/noahlan/ntool-biz/zero/statusz"
|
|
|
|
"git.noahlan.cn/n-admin/n-admin-server/api/internal/logic/captcha"
|
|
"git.noahlan.cn/n-admin/n-admin-server/api/internal/svc"
|
|
)
|
|
|
|
// swagger:route get /api/captcha captcha GetCaptcha
|
|
//
|
|
// Get Captcha | 获取验证码
|
|
//
|
|
// Get Captcha | 获取验证码
|
|
//
|
|
// Responses:
|
|
// 200: CaptchaInfo
|
|
|
|
func GetCaptchaHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
const transErr = true
|
|
|
|
l := captcha.NewGetCaptchaLogic(r, r.Context(), svcCtx)
|
|
resp, err := l.GetCaptcha()
|
|
|
|
statusz.ResponseHandler(r, w, transErr, resp, err)
|
|
|
|
}
|
|
}
|