Skip to content

Commit 8ad56b6

Browse files
committed
Explicitly set pagination limit on listing clusters.
1 parent 1bb3611 commit 8ad56b6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/client/client.cr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ module CB
7575
resp = http.exec method, "http://#{@host}/#{path}", headers: headers, body: body
7676
Log.info &.emit("API Call", status: resp.status.code, path: path, method: method)
7777
if resp.body && ENV["HTTP_DEBUG"]?
78-
body = mabye_json_parse resp.body
78+
body = maybe_json_parse resp.body
7979
status = resp.status.code
8080
pp! [method, path, status, body] # ameba:disable Lint/DebugCalls
8181
end
@@ -91,7 +91,7 @@ module CB
9191
end
9292
end
9393

94-
private def mabye_json_parse(str)
94+
private def maybe_json_parse(str)
9595
JSON.parse str
9696
rescue
9797
str

src/client/cluster.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module CB
2222
end
2323

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

0 commit comments

Comments
 (0)