Skip to content

Commit

Permalink
hotfix : page num - 1
Browse files Browse the repository at this point in the history
  • Loading branch information
0BVer committed Aug 27, 2023
1 parent 6ae8ad9 commit dd3c20f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion movieReview/movie/repository/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (r *Repository) FindAllByScore(params domain.PaginationParams) ([]domain.Sc
"GROUP BY movies.id "+
"ORDER BY ScoreAvg DESC "+
"LIMIT ? OFFSET ?",
params.Size, params.Page*params.Size,
params.Size-1, (params.Page-1)*params.Size,
).Scan(&res).Error
if err != nil {
return []domain.ScoreRankResponse{}, err
Expand Down

0 comments on commit dd3c20f

Please sign in to comment.