ip
This commit is contained in:
@@ -489,19 +489,19 @@ function miCuenta() {
|
||||
this.tg.verificando = true;
|
||||
this.tg.verMsg = '';
|
||||
try {
|
||||
const r = await axios.get('/portal/mi-perfil/telegram-status');
|
||||
if (r.data.linked) {
|
||||
const r = await axios.post('/portal/mi-perfil/telegram-validar');
|
||||
if (r.data.ok) {
|
||||
this.tg.linked = true;
|
||||
this.tg.chat_id = r.data.chat_id;
|
||||
this.tg.token = '';
|
||||
this.tg.verMsg = '✅ ¡Telegram vinculado correctamente!';
|
||||
this.tg.verOk = true;
|
||||
} else {
|
||||
this.tg.verMsg = 'Aún no se detectó el mensaje. Asegúrate de enviar el código al bot.';
|
||||
this.tg.verMsg = r.data.error || 'No se encontró el mensaje. Envía /vincular ' + this.tg.token + ' al bot.';
|
||||
this.tg.verOk = false;
|
||||
}
|
||||
} catch(e) {
|
||||
this.tg.verMsg = 'Error al verificar. Intenta de nuevo.';
|
||||
this.tg.verMsg = e.response?.data?.error || 'Error al verificar. Intenta de nuevo.';
|
||||
this.tg.verOk = false;
|
||||
} finally { this.tg.verificando = false; }
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user