Skip to content

Commit

Permalink
Explicitly set pagination limit on listing clusters.
Browse files Browse the repository at this point in the history
  • Loading branch information
abrightwell committed Nov 5, 2024
1 parent 1bb3611 commit 8ad56b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/client/client.cr
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ module CB
resp = http.exec method, "http://#{@host}/#{path}", headers: headers, body: body
Log.info &.emit("API Call", status: resp.status.code, path: path, method: method)
if resp.body && ENV["HTTP_DEBUG"]?
body = mabye_json_parse resp.body
body = maybe_json_parse resp.body
status = resp.status.code
pp! [method, path, status, body] # ameba:disable Lint/DebugCalls
end
Expand All @@ -91,7 +91,7 @@ module CB
end
end

private def mabye_json_parse(str)
private def maybe_json_parse(str)
JSON.parse str
rescue
str
Expand Down
2 changes: 1 addition & 1 deletion src/client/cluster.cr
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module CB
end

def get_clusters(team_id)
resp = get "clusters?order_field=name&team_id=#{team_id}"
resp = get "clusters?order_field=name&team_id=#{team_id}&limit=200"
Array(CB::Model::Cluster).from_json resp.body, root: "clusters"
end

Expand Down

0 comments on commit 8ad56b6

Please sign in to comment.