feat: update
This commit is contained in:
@@ -28,15 +28,21 @@ func (r *Routes) Name() string {
|
||||
|
||||
func (r *Routes) Register(router fiber.Router) {
|
||||
// 注册路由组: posts
|
||||
router.Get("/v1/posts", DataFunc2(
|
||||
router.Get("/", DataFunc2(
|
||||
r.posts.List,
|
||||
Query[requests.Pagination]("pagination"),
|
||||
Query[ListQuery]("query"),
|
||||
))
|
||||
|
||||
router.Get("/v1/posts/:id", DataFunc1(
|
||||
router.Get("/show/:id", DataFunc1(
|
||||
r.posts.Show,
|
||||
PathParam[int64]("id"),
|
||||
))
|
||||
|
||||
router.Get("/mine", DataFunc2(
|
||||
r.posts.Mine,
|
||||
Query[requests.Pagination]("pagination"),
|
||||
Query[ListQuery]("query"),
|
||||
))
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user