feat: update post detail page

This commit is contained in:
yanghao05
2025-04-25 11:39:28 +08:00
parent 505c41e9ef
commit b8c2c245f2
15 changed files with 191 additions and 76 deletions

View File

@@ -58,7 +58,7 @@ func (r *Routes) Register(router fiber.Router) {
Local[*model.Users]("user"),
))
router.Get("/api/posts/show/:id", DataFunc1(
router.Get("/api/posts/:id", DataFunc1(
r.posts.Show,
PathParam[int64]("id"),
))
@@ -69,7 +69,7 @@ func (r *Routes) Register(router fiber.Router) {
Query[ListQuery]("query"),
))
router.Get("/api/posts/buy/:id", DataFunc2(
router.Get("/api/posts/:id/buy", DataFunc2(
r.posts.Buy,
PathParam[int64]("id"),
Local[*model.Users]("user"),