fix: sorting
This commit is contained in:
@@ -61,6 +61,6 @@ func (service *AuthorService) Count() (int64, error) {
|
||||
amount, err := dal.Author.Count()
|
||||
return amount, err
|
||||
}
|
||||
func (service *AuthorService) SortedByOrder(fieldsSortOrder map[string]string) ([]*Author, error) {
|
||||
return utils.SortByOrder(fieldsSortOrder, Author{})
|
||||
func (service *AuthorService) SortedByOrder(fieldsSortingOrder []utils.SortField) ([]*Author, error) {
|
||||
return utils.SortByOrder(fieldsSortingOrder, Author{})
|
||||
}
|
||||
|
||||
@@ -61,6 +61,6 @@ func (service *CommentService) Count() (int64, error) {
|
||||
amount, err := dal.Comment.Count()
|
||||
return amount, err
|
||||
}
|
||||
func (service *CommentService) SortedByOrder(fieldsSortOrder map[string]string) ([]*Comment, error) {
|
||||
func (service *CommentService) SortedByOrder(fieldsSortOrder []utils.SortField) ([]*Comment, error) {
|
||||
return utils.SortByOrder(fieldsSortOrder, Comment{})
|
||||
}
|
||||
|
||||
@@ -61,6 +61,6 @@ func (service *PostService) Count() (int64, error) {
|
||||
return amount, err
|
||||
}
|
||||
|
||||
func (service *PostService) SortedByOrder(fieldsSortOrder map[string]string) ([]*Post, error) {
|
||||
func (service *PostService) SortedByOrder(fieldsSortOrder []utils.SortField) ([]*Post, error) {
|
||||
return utils.SortByOrder(fieldsSortOrder, Post{})
|
||||
}
|
||||
|
||||
@@ -60,6 +60,6 @@ func (service *PostTypeService) Count() (int64, error) {
|
||||
return amount, err
|
||||
}
|
||||
|
||||
func (service *PostTypeService) SortedByOrder(fieldsSortOrder map[string]string) ([]*PostType, error) {
|
||||
func (service *PostTypeService) SortedByOrder(fieldsSortOrder []utils.SortField) ([]*PostType, error) {
|
||||
return utils.SortByOrder(fieldsSortOrder, PostType{})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user