X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/a6633642232efd164d4708967ab59e498fbff896..refs/pull/2820/head:/app/Http/Controllers/StatusController.php diff --git a/app/Http/Controllers/StatusController.php b/app/Http/Controllers/StatusController.php index 9f4ed4d89..336e063ab 100644 --- a/app/Http/Controllers/StatusController.php +++ b/app/Http/Controllers/StatusController.php @@ -1,4 +1,6 @@ - $this->trueWithoutError(function () { $rand = Str::random(); Cache::set('status_test', $rand); + return Cache::get('status_test') === $rand; }), 'session' => $this->trueWithoutError(function () { $rand = Str::random(); Session::put('status_test', $rand); + return Session::get('status_test') === $rand; }), ]; $hasError = in_array(false, $statuses); + return response()->json($statuses, $hasError ? 500 : 200); }