From 9e7ded8b15d847470d0d43186d730b96b19fc949 Mon Sep 17 00:00:00 2001 From: Kavalar Date: Sat, 4 Jan 2025 02:04:39 +0300 Subject: [PATCH] debug --- app/modules/tgbot/views/tgbot/layout/main.php | 1 + resources/main/js/tg.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/app/modules/tgbot/views/tgbot/layout/main.php b/app/modules/tgbot/views/tgbot/layout/main.php index 6cdb138..de0d12f 100644 --- a/app/modules/tgbot/views/tgbot/layout/main.php +++ b/app/modules/tgbot/views/tgbot/layout/main.php @@ -68,6 +68,7 @@
+
diff --git a/resources/main/js/tg.js b/resources/main/js/tg.js index b721b0d..16cbe8c 100644 --- a/resources/main/js/tg.js +++ b/resources/main/js/tg.js @@ -1,7 +1,9 @@ document.addEventListener("DOMContentLoaded", () => { let tg = window.Telegram.WebApp; let username_tag = document.getElementById("username_tag") + let user_id_tag = document.getElementById("user_id_tag") username_tag.innerHTML = tg.initDataUnsafe.user.username; + user_id_tag.innerHTML = tg.initDataUnsafe.user.id; console.log(tg.initDataUnsafe) }); \ No newline at end of file