feat: phone validation
Some checks failed
build quyun / Build (push) Failing after 1m25s

This commit is contained in:
2025-12-20 11:47:45 +08:00
parent fdbf26d751
commit 0e4af79b53
31 changed files with 1130 additions and 984 deletions

View File

@@ -22,14 +22,14 @@ type TokenResponse struct {
// Login
//
// @Summary 管理员登录
// @Tags Admin Auth
// @Accept json
// @Produce json
// @Param body body AuthBody true "请求体"
// @Success 200 {object} TokenResponse "成功"
// @Router /admin/auth [post]
// @Bind body body
// @Summary 管理员登录
// @Tags Admin Auth
// @Accept json
// @Produce json
// @Param body body AuthBody true "请求体"
// @Success 200 {object} TokenResponse "成功"
// @Router /admin/auth [post]
// @Bind body body
func (ctl *auth) Login(ctx fiber.Ctx, body *AuthBody) (*TokenResponse, error) {
if body.Username == "pl.yang" && body.Password == "Xixi@0202" {
claim := ctl.jwt.CreateClaims(jwt.BaseClaims{