diff --git a/internal/dao/slonik/topics.go b/internal/dao/slonik/topics.go index 70bfc9ee..94af2c1c 100644 --- a/internal/dao/slonik/topics.go +++ b/internal/dao/slonik/topics.go @@ -82,11 +82,11 @@ func (s *topicServant) DecrTagsById(ids []int64) error { }) } -func (s *topicServant) ListTags(typ cs.TagType, offset int, limit int) (res cs.TagList, _ error) { +func (s *topicServant) ListTags(typ cs.TagType, limit int, offset int) (res cs.TagList, _ error) { ctx := context.Background() switch typ { case cs.TagTypeHot: - tags, err := s.q.HotTags(ctx, &dbr.HotTagsParams{Offset: int32(offset), Limit: int32(limit)}) + tags, err := s.q.HotTags(ctx, &dbr.HotTagsParams{Limit: int32(limit), Offset: int32(offset)}) if err != nil { return nil, err } @@ -107,7 +107,7 @@ func (s *topicServant) ListTags(typ cs.TagType, offset int, limit int) (res cs.T }) } case cs.TagTypeNew: - tags, err := s.q.NewestTags(ctx, &dbr.NewestTagsParams{Offset: int32(offset), Limit: int32(limit)}) + tags, err := s.q.NewestTags(ctx, &dbr.NewestTagsParams{Limit: int32(limit), Offset: int32(offset)}) if err != nil { return nil, err } diff --git a/internal/dao/slonik/tweets.go b/internal/dao/slonik/tweets.go index 5b6185d4..4cdd2526 100644 --- a/internal/dao/slonik/tweets.go +++ b/internal/dao/slonik/tweets.go @@ -194,7 +194,7 @@ func (s *tweetServant) GetPostByID(id int64) (*core.Post, error) { return nil, nil } -func (s *tweetServant) GetPosts(conditions *core.ConditionsT, offset, limit int) ([]*core.Post, error) { +func (s *tweetServant) GetPosts(conditions *core.ConditionsT, limit int, offset int) ([]*core.Post, error) { // TODO debug.NotImplemented() return nil, nil @@ -212,7 +212,7 @@ func (s *tweetServant) GetUserPostStar(postID, userID int64) (*core.PostStar, er return nil, nil } -func (s *tweetServant) GetUserPostStars(userID int64, offset, limit int) ([]*core.PostStar, error) { +func (s *tweetServant) GetUserPostStars(userID int64, limit int, offset int) ([]*core.PostStar, error) { // TODO debug.NotImplemented() return nil, nil @@ -230,7 +230,7 @@ func (s *tweetServant) GetUserPostCollection(postID, userID int64) (*core.PostCo return nil, nil } -func (s *tweetServant) GetUserPostCollections(userID int64, offset, limit int) ([]*core.PostCollection, error) { +func (s *tweetServant) GetUserPostCollections(userID int64, limit int, offset int) ([]*core.PostCollection, error) { // TODO debug.NotImplemented() return nil, nil @@ -242,7 +242,7 @@ func (s *tweetServant) GetUserPostCollectionCount(userID int64) (int64, error) { return 0, nil } -func (s *tweetServant) GetUserWalletBills(userID int64, offset, limit int) ([]*core.WalletStatement, error) { +func (s *tweetServant) GetUserWalletBills(userID int64, limit int, offset int) ([]*core.WalletStatement, error) { // TODO debug.NotImplemented() return nil, nil @@ -292,7 +292,7 @@ func (s *tweetServant) ReactionByTweetId(userId int64, tweetId int64) (*cs.React return nil, debug.ErrNotImplemented } -func (s *tweetServant) UserReactions(userId int64, offset int, limit int) (cs.ReactionList, error) { +func (s *tweetServant) UserReactions(userId int64, limit int, offset int) (cs.ReactionList, error) { // TODO return nil, debug.ErrNotImplemented } @@ -302,7 +302,7 @@ func (s *tweetServant) FavoriteByTweetId(userId int64, tweetId int64) (*cs.Favor return nil, debug.ErrNotImplemented } -func (s *tweetServant) UserFavorites(userId int64, offset int, limit int) (cs.FavoriteList, error) { +func (s *tweetServant) UserFavorites(userId int64, limit int, offset int) (cs.FavoriteList, error) { // TODO return nil, debug.ErrNotImplemented }