Skip to content
Snippets Groups Projects
Commit bed9a54a authored by Dean's avatar Dean
Browse files

remove unneeded constant in lib/routes/listobjects.go

parent 3e0f7123
No related branches found
No related tags found
No related merge requests found
......@@ -12,11 +12,8 @@ import (
"github.com/rs/zerolog/log"
)
// Objects per page
const perPage = 50
// Maximum objects per page
const maxPerPage = 100
const maxOffset = 100
// listObjectsResponse is the response format for ListObjects.
type listObjectsResponse struct {
......@@ -44,7 +41,7 @@ func ListObjects(w http.ResponseWriter, r *http.Request) {
if err != nil {
panic(apierrors.InvalidOffsetOrLimit)
}
if limit > maxPerPage {
if limit > maxOffset {
panic(apierrors.OffsetTooLarge)
}
asc := false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment