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 @@
+ = $content ?> 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