mirror of
https://github.com/iv-org/instances-api.git
synced 2024-11-23 05:39:45 +00:00
Fix cast error of uptime value (#50)
This commit is contained in:
parent
88bb7ecfaa
commit
3eedbaf66b
@ -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 },
|
||||
|
Loading…
Reference in New Issue
Block a user