Fix cast error of uptime value (#50)

This commit is contained in:
Samantaz Fox
2024-04-22 17:50:07 +00:00
committed by GitHub
parent 88bb7ecfaa
commit 3eedbaf66b
+1 -1
View File
@@ -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 },