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

Apply 1 suggestion(s) to 1 file(s)

parent c84db3b5
No related branches found
No related tags found
No related merge requests found
......@@ -50,11 +50,12 @@ func ListObjects(w http.ResponseWriter, r *http.Request) {
// Determine offset, limit and filter params
query := r.URL.Query()
var limit int
l := query.Get("limit")
if l == "" {
var (
query = r.URL.Query()
limit = maxLimit
} else {
l = query.Get("limit")
)
if l != "" {
limit, err := strconv.Atoi(l)
if err != nil || limit < 0 {
panic(apierrors.InvalidOffsetOrLimit)
......
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