feat: 更新内容相关接口,使用统一的分页响应结构
This commit is contained in:
@@ -5,21 +5,22 @@ import (
|
||||
|
||||
content_dto "quyun/v2/app/http/v1/dto"
|
||||
user_dto "quyun/v2/app/http/v1/dto"
|
||||
"quyun/v2/app/requests"
|
||||
)
|
||||
|
||||
// @provider
|
||||
type content struct{}
|
||||
|
||||
func (s *content) List(ctx context.Context, keyword, genre, tenantId, sort string, page int) (*content_dto.ContentListResponse, error) {
|
||||
return &content_dto.ContentListResponse{}, nil
|
||||
func (s *content) List(ctx context.Context, keyword, genre, tenantId, sort string, page int) (*requests.Pager, error) {
|
||||
return &requests.Pager{}, nil
|
||||
}
|
||||
|
||||
func (s *content) Get(ctx context.Context, id string) (*content_dto.ContentDetail, error) {
|
||||
return &content_dto.ContentDetail{}, nil
|
||||
}
|
||||
|
||||
func (s *content) ListComments(ctx context.Context, id string, page int) (*content_dto.CommentListResponse, error) {
|
||||
return &content_dto.CommentListResponse{}, nil
|
||||
func (s *content) ListComments(ctx context.Context, id string, page int) (*requests.Pager, error) {
|
||||
return &requests.Pager{}, nil
|
||||
}
|
||||
|
||||
func (s *content) CreateComment(ctx context.Context, id string, form *content_dto.CommentCreateForm) error {
|
||||
@@ -60,4 +61,4 @@ func (s *content) RemoveLike(ctx context.Context, contentId string) error {
|
||||
|
||||
func (s *content) ListTopics(ctx context.Context) ([]content_dto.Topic, error) {
|
||||
return []content_dto.Topic{}, nil
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user