From 765de2eeba43a867e573ce588f26874e0e2aceb2 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 29 Apr 2023 07:44:37 +0200 Subject: [PATCH] Change health endpoint to include a DB check. --- app/Http/Controllers/System/HealthcheckController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Http/Controllers/System/HealthcheckController.php b/app/Http/Controllers/System/HealthcheckController.php index fef70b5b05..b6aad6e927 100644 --- a/app/Http/Controllers/System/HealthcheckController.php +++ b/app/Http/Controllers/System/HealthcheckController.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace FireflyIII\Http\Controllers\System; +use FireflyIII\User; use FireflyIII\Http\Controllers\Controller; use Illuminate\Http\Response; @@ -38,6 +39,7 @@ class HealthcheckController extends Controller */ public function check(): Response { + User::count(); // sanity check for database health. Will crash if not OK. return response('OK', 200); } }