This commit is contained in:
Lizandro Guarnizo
2026-01-28 13:49:07 -05:00
parent 40bc8d15e7
commit 2bf7d6c9a8
6 changed files with 20 additions and 4 deletions
+4 -3
View File
@@ -2384,7 +2384,8 @@ if (!isset($_SESSION['user_id'])) {
headers: {
'Content-Type': 'application/json'
},
credentials: 'same-origin' // Incluir cookies de sesión
credentials: 'same-origin', // Incluir cookies de sesión
cache: 'no-store' // Evitar caché del navegador
};
// Si se pasa body, asumimos POST (y serializamos)
@@ -4366,7 +4367,7 @@ if (!isset($_SESSION['user_id'])) {
try {
// Load autoresponses (text quick replies)
const respText = await apiCall('get_autoresponses.php');
const respText = await this.apiCall('get_autoresponses.php');
if (respText && respText.success && Array.isArray(respText.data)) {
let added = 0;
respText.data.forEach(r => {
@@ -4393,7 +4394,7 @@ if (!isset($_SESSION['user_id'])) {
}
try {
const resp = await apiCall('get_templates.php?approved_only=1&limit=30');
const resp = await this.apiCall('get_templates.php?approved_only=1&limit=30');
if (resp && resp.success && Array.isArray(resp.data)) {
let added = 0;
resp.data.forEach(t => {