From 207f4acb31f4f9fe00b45e89c3ecacb9cbe53877 Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Mon, 22 Apr 2024 16:05:50 +0000 Subject: [PATCH] Fix cast error of uptime value --- src/instances.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/instances.cr b/src/instances.cr index 958fecb2..b4b6055d 100644 --- a/src/instances.cr +++ b/src/instances.cr @@ -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 },