update controllers logic
This commit is contained in:
@@ -2,8 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers\Api\System;
|
||||
|
||||
use App\Http\Controllers\Api\BaseApiController;
|
||||
use App\Http\Resources\System\HealthStatusResource;
|
||||
use App\Http\Controllers\Api\Core\BaseApiController;
|
||||
use App\Services\System\HealthCheckService;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
@@ -20,8 +19,7 @@ class HealthController extends BaseApiController
|
||||
$payload = $this->service->check();
|
||||
$status = $payload['ok'] ? Response::HTTP_OK : Response::HTTP_SERVICE_UNAVAILABLE;
|
||||
|
||||
return $this->success([
|
||||
'health' => new HealthStatusResource($payload),
|
||||
], 'Health check.', $status);
|
||||
// CodeIgniter admin/API health returns a flat JSON body (no Laravel success envelope).
|
||||
return response()->json($payload, $status);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user