From bed9a54a34af92e455d53cb4995da2f88e841c70 Mon Sep 17 00:00:00 2001 From: Dean Sheather <dean@deansheather.com> Date: Mon, 25 Feb 2019 14:58:42 +1000 Subject: [PATCH] remove unneeded constant in lib/routes/listobjects.go --- lib/routes/listobjects.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/routes/listobjects.go b/lib/routes/listobjects.go index 6cf6816..08b0ce3 100644 --- a/lib/routes/listobjects.go +++ b/lib/routes/listobjects.go @@ -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 -- GitLab