generated from kedaya_haitao/template
31 lines
652 B
Go
31 lines
652 B
Go
|
package service
|
||
|
|
||
|
import (
|
||
|
"gitea.timerzz.com/kedaya_haitao/common/pkg/web"
|
||
|
"gitea.timerzz.com/kedaya_haitao/common/structs/storage"
|
||
|
"gitea.timerzz.com/kedaya_haitao/common/structs/utils"
|
||
|
v2 "gitea.timerzz.com/kedaya_haitao/common/structs/v2"
|
||
|
"github.com/gofiber/fiber/v3"
|
||
|
"github.com/henrylee2cn/ameda"
|
||
|
)
|
||
|
|
||
|
type Article struct {
|
||
|
storage *storage.Storage
|
||
|
}
|
||
|
|
||
|
func NewArticle(storage *storage.Storage) *Article {
|
||
|
return &Article{
|
||
|
storage: storage,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (s *Article) Registry(r fiber.Router) {
|
||
|
api := r.Group("/api/v2")
|
||
|
}
|
||
|
|
||
|
func (s *Article) List(c fiber.Ctx) error {
|
||
|
|
||
|
|
||
|
return c.JSON(web.NewResponse(web.NewListResponse(total, sellers)))
|
||
|
}
|