feat: 添加用户注册功能,包括表单验证和路由注册

This commit is contained in:
2025-12-24 22:46:50 +08:00
parent 7a03ba3a00
commit fd9e54e9f4
7 changed files with 240 additions and 6 deletions

View File

@@ -52,6 +52,11 @@ func (r *Routes) Register(router fiber.Router) {
r.auth.login,
Body[dto.LoginForm]("form"),
))
r.log.Debugf("Registering route: Post /v1/auth/register -> auth.register")
router.Post("/v1/auth/register"[len(r.Path()):], DataFunc1(
r.auth.register,
Body[dto.RegisterForm]("form"),
))
// Register routes for controller: me
r.log.Debugf("Registering route: Get /v1/me -> me.me")
router.Get("/v1/me"[len(r.Path()):], DataFunc0(