This commit is contained in:
Lizandro Guarnizo
2026-06-13 13:19:02 -05:00
parent 0e51165108
commit f34d19b3df
4 changed files with 43 additions and 4 deletions
+4
View File
@@ -82,6 +82,8 @@ if ($accion === 'reabrir') {
if ($accion === 'config_wa') {
$template = trim($input['template'] ?? '');
$lang = trim($input['lang'] ?? 'es_CO');
$waKiosko = (int)($input['wa_kiosko'] ?? 0);
$waConsent = (int)($input['wa_consent'] ?? 0);
if ($template === '') jsonError('El nombre de plantilla es requerido');
if (!preg_match('/^[a-z0-9_]{1,64}$/i', $template)) {
@@ -98,6 +100,8 @@ if ($accion === 'config_wa') {
);
$upsert->execute(['turnero_wa_template', $template]);
$upsert->execute(['turnero_wa_lang', $lang]);
$upsert->execute(['turnero_wa_kiosko_enabled', (string)$waKiosko]);
$upsert->execute(['turnero_wa_consent_enabled', (string)$waConsent]);
jsonOk([], 'Configuración WhatsApp guardada');
}