Skip to content

Commit

Permalink
Fix cast error of uptime value
Browse files Browse the repository at this point in the history
  • Loading branch information
SamantazFox authored Apr 22, 2024
1 parent 88bb7ec commit 207f4ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/instances.cr
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ static_headers do |response, filepath, filestat|
end

SORT_PROCS = {
"health" => ->(alias : String, instance : Instance) { -(instance[:monitor]?.try &.["uptime"].as_s.to_f || 0.0) },
"health" => ->(alias : String, instance : Instance) { -(instance[:monitor]?.try &.["uptime"].as_f || 0.0) },
"location" => ->(alias : String, instance : Instance) { instance[:region]? || "ZZ" },
"name" => ->(name : String, instance : Instance) { name },
"signup" => ->(alias : String, instance : Instance) { instance[:stats]?.try &.["openRegistrations"]?.try { |bool| bool.as_bool ? 0 : 1 } || 2 },
Expand Down

0 comments on commit 207f4ac

Please sign in to comment.