Skip to content

Commit

Permalink
modify pagination interceptor (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
hobiJeong authored Jan 6, 2024
2 parents 8822442 + bc25039 commit d860411
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ export class ResponseBuilder {

const currentPage = Number(pageDto.page) || 1;
const pageSize = Number(pageDto.pageSize) || PAGE_SIZE.DEFAULT;
const nextPage = pageSize * currentPage < totalCount ? pageSize + 1 : null;
const nextPage =
pageSize * currentPage < totalCount ? currentPage + 1 : null;
const hasNext = pageSize * currentPage < totalCount;
const lastPage = Math.ceil(totalCount / pageSize);

Expand Down

0 comments on commit d860411

Please sign in to comment.