From dcd95d687c98f27b853835ee9bfd88dcf655e868 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 12 Aug 2024 21:21:29 -0600 Subject: [PATCH] Update ApiV1Controller, fix v1/instance stats, force cast to int --- app/Http/Controllers/Api/ApiV1Controller.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index 80c955fb9..253e21f7d 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -1663,9 +1663,9 @@ class ApiV1Controller extends Controller $stats = Cache::remember('api:v1:instance-data:stats', 43200, function () { return [ - 'user_count' => User::count(), - 'status_count' => StatusService::totalLocalStatuses(), - 'domain_count' => Instance::count(), + 'user_count' => (int) User::count(), + 'status_count' => (int) StatusService::totalLocalStatuses(), + 'domain_count' => (int) Instance::count(), ]; });