From 7cc2ad911737c536012d464b93e24f36f194b2c2 Mon Sep 17 00:00:00 2001 From: Fijxu Date: Mon, 28 Apr 2025 18:01:41 -0400 Subject: [PATCH] chore: use Database::Files.file_count to get the files hosted count --- src/routes/misc.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/misc.cr b/src/routes/misc.cr index 6af5306..0b925de 100644 --- a/src/routes/misc.cr +++ b/src/routes/misc.cr @@ -18,7 +18,7 @@ module Routing::Misc property alternative_domains : Array(String) def initialize - @files_hosted = SQL.query_one("SELECT COUNT (filename) FROM files", as: Int32) + @files_hosted = Database::Files.file_count @max_upload_size = CONFIG.size_limit.to_s @thumbnail_generation = CONFIG.generate_thumbnails @filename_length = CONFIG.filename_length