Skip to content

Commit

Permalink
Add limit and offset of list entries page
Browse files Browse the repository at this point in the history
  • Loading branch information
jimyhuang committed Oct 14, 2023
1 parent ded64cc commit a87af29
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backend/pkg/restapi/list/entries.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@ import (
func Entries(w http.ResponseWriter, req *http.Request) {
queryParams := req.URL.Query()
offsetStr := queryParams.Get("offset")
limitStr := queryParams.Get("limit")
offset, err := strconv.Atoi(offsetStr)
if err != nil {
offset = 0
}
limit := 100
limit, err := strconv.Atoi(limitStr)
if err != nil {
limit = 100
}

result := make([]goshort.GoShort, 0)

Expand Down
Binary file modified docker/goshort
Binary file not shown.

0 comments on commit a87af29

Please sign in to comment.