update controllers logic

This commit is contained in:
root
2026-04-23 00:04:35 -04:00
parent 1977a513df
commit ca4ba272fc
353 changed files with 13402 additions and 1301 deletions
@@ -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);
}
}