fix(api): agregar db() helper, corregir requireAuth() en check_whatsapp

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-06-24 09:27:03 -05:00
co-authored by Claude Sonnet 4.6
parent 92e4d01181
commit 9e7637582d
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -48,6 +48,13 @@ if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
requireAuthentication();
/**
* Shorthand para obtener la conexión PDO.
*/
function db(): \PDO {
return Database::getInstance()->getConnection();
}
/**
* ID del admin autenticado actualmente.
*/