fix: rename chat API routes to avoid Nginx /admin/chat/* redirect conflict

/admin/chat/conversations → /admin/chat-convs
/admin/chat/messages     → /admin/chat-msgs
/admin/chat/send         → /admin/chat-send

The production server was intercepting all subpaths of /admin/chat and
redirecting them back to /admin/chat, so fetch never received JSON.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-06-27 19:43:06 -05:00
co-authored by Claude Sonnet 4.6
parent 33869a6622
commit 4f30ed4447
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -91,9 +91,9 @@ $routes = [
['GET', '/admin/webhook/stream', fn() => DashboardController::stream()],
['GET', '/admin/webhook/raw', fn() => DashboardController::getRaw()],
['GET', '/admin/chat', fn() => DashboardController::chat()],
['GET', '/admin/chat/conversations', fn() => DashboardController::chatConversations()],
['GET', '/admin/chat/messages', fn() => DashboardController::chatMessages()],
['POST', '/admin/chat/send', fn() => DashboardController::chatSend()],
['GET', '/admin/chat-convs', fn() => DashboardController::chatConversations()],
['GET', '/admin/chat-msgs', fn() => DashboardController::chatMessages()],
['POST', '/admin/chat-send', fn() => DashboardController::chatSend()],
// ─── Páginas legales (requeridas por Meta/WhatsApp Business) ────────────
['GET', '/politicas', fn() => serveHtml('politicas.html')],