Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pagination/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## To be released

* feat(pagination): add `json` tag to `Request`

## v1.1.2

* feat(pagination): add `log` tag to `Request` and `Meta`
Expand Down
4 changes: 2 additions & 2 deletions pagination/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package pagination
const defaultPerPage = 20

type Request struct {
Page int `log:"page"` // page requested (default 1)
PerPage int `log:"per_page"` // Number of items per page
Page int `json:"page" log:"page"` // page requested (default 1)
PerPage int `json:"per_page" log:"per_page"` // Number of items per page
}

func NewRequest(page, perPage int) Request {
Expand Down
Loading