From b3baf4108e1e977aeb670c0b44e3e17aeeefd2c7 Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Thu, 16 May 2024 09:26:51 +0300 Subject: [PATCH] remove test webhook step --- front/pages/bx/tg.vue | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/front/pages/bx/tg.vue b/front/pages/bx/tg.vue index 10b26f0..7d52fd7 100644 --- a/front/pages/bx/tg.vue +++ b/front/pages/bx/tg.vue @@ -11,7 +11,7 @@ interface APIBody { status: 'success' | 'error' } -const steps = ['get_me', 'get_user_id', 'get_bx', "end_step", "test_webhook"] +const steps = ['get_me', 'get_user_id', 'get_bx', "end_step"] const { data, pending, error, status } = await useLazyFetch(`${config.public.apiBase}/api/tg/get_me`, { server: false }) @@ -60,10 +60,6 @@ const nextStep = async () => { await retryStep('end_step') passToStep('end_step') } - else if (step.value == 'end_step') { - await retryStep('test_webhook') - passToStep('test_webhook') - } } const retryStep = async (stepName: typeof steps[number]) => { if (stepName == 'get_user_id') { @@ -81,9 +77,8 @@ const retryStep = async (stepName: typeof steps[number]) => { } } -const testWebhook = async () => { - const bx_res = await $fetch(`${config.public.apiBase}/api/bx/test_webhook/${selected_tg.value}`) - console.log(bx_res) +const copyOnClick = (e:Event) => { + navigator.clipboard.writeText(e.currentTarget.textContent) }