fix(pacientes): corregir acceso a d.found y d.user_id en verificarWhatsapp

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-06-24 09:29:36 -05:00
co-authored by Claude Sonnet 4.6
parent 6d63112d76
commit 062f565ab5
+2 -2
View File
@@ -531,9 +531,9 @@ async function verificarWhatsapp() {
try {
const r = await fetch(`api/lab/check_whatsapp.php?phone=${encodeURIComponent(tel)}`);
const d = await r.json();
if (d.ok && d.data.found) {
if (d.ok && d.found) {
badge.innerHTML = '<span class="text-success"><i class="fab fa-whatsapp me-1"></i>Registrado en WhatsApp</span>';
hiddenUid.value = d.data.user_id;
hiddenUid.value = d.user_id;
} else {
badge.innerHTML = '<span class="text-muted"><i class="fas fa-times-circle me-1"></i>Sin WhatsApp registrado</span>';
hiddenUid.value = '';