mirror of
https://gitea.invidious.io/iv-org/instances-api.git
synced 2024-08-15 00:53:15 +00:00
Fix cast error of uptime value (#50)
This commit is contained in:
parent
88bb7ecfaa
commit
3eedbaf66b
1 changed files with 1 additions and 1 deletions
|
@ -144,7 +144,7 @@ static_headers do |response, filepath, filestat|
|
||||||
end
|
end
|
||||||
|
|
||||||
SORT_PROCS = {
|
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" },
|
"location" => ->(alias : String, instance : Instance) { instance[:region]? || "ZZ" },
|
||||||
"name" => ->(name : String, instance : Instance) { name },
|
"name" => ->(name : String, instance : Instance) { name },
|
||||||
"signup" => ->(alias : String, instance : Instance) { instance[:stats]?.try &.["openRegistrations"]?.try { |bool| bool.as_bool ? 0 : 1 } || 2 },
|
"signup" => ->(alias : String, instance : Instance) { instance[:stats]?.try &.["openRegistrations"]?.try { |bool| bool.as_bool ? 0 : 1 } || 2 },
|
||||||
|
|
Loading…
Reference in a new issue