feat: update ui
This commit is contained in:
@@ -27,7 +27,7 @@ type posts struct {
|
||||
}
|
||||
|
||||
// List posts
|
||||
// @Router / [get]
|
||||
// @Router /api/posts [get]
|
||||
// @Bind pagination query
|
||||
// @Bind query query
|
||||
// @Bind user local
|
||||
@@ -37,14 +37,14 @@ func (ctl *posts) List(ctx fiber.Ctx, pagination *requests.Pagination, query *Li
|
||||
}
|
||||
|
||||
// Show
|
||||
// @Router /show/:id [get]
|
||||
// @Router /api/posts/show/:id [get]
|
||||
// @Bind id path
|
||||
func (ctl *posts) Show(ctx fiber.Ctx, id int64) (*model.Posts, error) {
|
||||
return models.Posts.GetByID(ctx.Context(), id)
|
||||
}
|
||||
|
||||
// Mine posts
|
||||
// @Router /mine [get]
|
||||
// @Router /api/posts/mine [get]
|
||||
// @Bind pagination query
|
||||
// @Bind query query
|
||||
func (ctl *posts) Mine(ctx fiber.Ctx, pagination *requests.Pagination, query *ListQuery) (*requests.Pager, error) {
|
||||
@@ -56,7 +56,7 @@ func (ctl *posts) Mine(ctx fiber.Ctx, pagination *requests.Pagination, query *Li
|
||||
var buyTpl string
|
||||
|
||||
// Buy
|
||||
// @Router /buy/:id [get]
|
||||
// @Router /api/posts/buy/:id [get]
|
||||
// @Bind id path
|
||||
func (ctl *posts) Buy(ctx fiber.Ctx, id int64) error {
|
||||
var userId int64 = 1
|
||||
|
||||
Reference in New Issue
Block a user