From 1b6e76cd46bd76ec633efb3b28e20914b0f5ba14 Mon Sep 17 00:00:00 2001 From: "christian.julian" Date: Sun, 15 Jun 2025 15:45:29 -0600 Subject: [PATCH] fix --- api_candidatos/api/index.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/api_candidatos/api/index.php b/api_candidatos/api/index.php index bf4aa43..52fd475 100644 --- a/api_candidatos/api/index.php +++ b/api_candidatos/api/index.php @@ -24,7 +24,19 @@ $normalizedPath = str_replace($basePath, '', $path); // Enrutamiento switch (true) { case preg_match('#^/oauth/token#', $normalizedPath): - require_once __DIR__ . '/../src/Oauth/Routes/AuthRoutes.php'; + $authPath = __DIR__ . '/../src/Oauth/Routes/AuthRoutes.php'; + + if (file_exists($authPath)) { + require_once $authPath; + } else { + http_response_code(500); + echo json_encode([ + 'error' => 'Archivo AuthRoutes.php no encontrado', + 'ruta_buscada' => $authPath + ]); + exit; + } + // /../src/candidatos/index.php break;