up
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user