Merge pull request #7443 from firefly-iii/expand-health-check

Change health endpoint to include a DB check.
This commit is contained in:
James Cole 2023-04-29 07:44:56 +02:00 committed by GitHub
commit 4c26f613ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}
}