public function intTestConnectivityAction(Request $request)
{
if (!$this->ensureAuthKey($request)) {
return $this->getAuthKeyErrorResponse();
}
$response = ['success' => true, 'errors' => [], 'message' => 'Connection successful'];
try {
$this->get('doctrine.dbal.default_connection')->connect();
} catch (DriverException $e) {
$response['success'] = false;
$response['message'] = 'Connection Error';
$response['errors'] = [$e->getMessage()];
}
return new JsonResponse($response);
}