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:
co-authored by
Claude Sonnet 4.6
parent
92e4d01181
commit
9e7637582d
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user