Skip to content

Commit

Permalink
fixed follow page incorrect results
Browse files Browse the repository at this point in the history
  • Loading branch information
alimy committed Oct 31, 2023
1 parent 6a66a29 commit a93cc01
Show file tree
Hide file tree
Showing 26 changed files with 37 additions and 25 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ TODO;
### Change
- frontend: optimize to use fold/unfold action for post item display.

### Fixed
- fixed follow page incorrect results.

## 0.5.1
### Added
- User/Profile page add setting option when page's user is self.
Expand Down
4 changes: 2 additions & 2 deletions internal/servants/web/followship.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (s *followshipSrv) ListFollowings(r *web.ListFollowingsReq) (*web.ListFollo
logrus.Errorf("Ds.GetUserByUsername err: %s", err)
return nil, web.ErrNoExistUsername
}
res, err := s.Ds.ListFollowings(he.ID, r.PageSize, r.Page-1)
res, err := s.Ds.ListFollowings(he.ID, r.PageSize, (r.Page-1)*r.PageSize)
if err != nil {
logrus.Errorf("Ds.ListFollowings err: %s", err)
return nil, web.ErrListFollowingsFailed
Expand All @@ -55,7 +55,7 @@ func (s *followshipSrv) ListFollows(r *web.ListFollowsReq) (*web.ListFollowsResp
logrus.Errorf("Ds.GetUserByUsername err: %s", err)
return nil, web.ErrNoExistUsername
}
res, err := s.Ds.ListFollows(he.ID, r.PageSize, r.Page-1)
res, err := s.Ds.ListFollows(he.ID, r.PageSize, (r.Page-1)*r.PageSize)
if err != nil {
logrus.Errorf("Ds.ListFollows err: %s", err)
return nil, web.ErrListFollowsFailed
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a93cc01

Please sign in to comment.