feat: update phone validation

This commit is contained in:
2025-12-20 11:52:08 +08:00
parent 0e4af79b53
commit 22e288bf98
6 changed files with 100 additions and 56 deletions

View File

@@ -78,6 +78,14 @@ func (r *Routes) Register(router fiber.Router) {
Query[ListQuery]("query"),
Local[*models.User]("user"),
))
r.log.Debugf("Registering route: Post /v1/auth/phone -> posts.Phone")
router.Post("/v1/auth/phone"[len(r.Path()):], Func0(
r.posts.Phone,
))
r.log.Debugf("Registering route: Post /v1/auth/validate -> posts.Validate")
router.Post("/v1/auth/validate"[len(r.Path()):], Func0(
r.posts.Validate,
))
r.log.Debugf("Registering route: Post /v1/posts/:id/buy -> posts.Buy")
router.Post("/v1/posts/:id/buy"[len(r.Path()):], DataFunc2(
r.posts.Buy,