mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI-examples.git
synced 2025-09-06 16:49:22 +00:00
code cleanup
optimized imports here and there, made CustomBot working as intended
This commit is contained in:
@@ -26,6 +26,7 @@ fun HTMLElement.log(text: String) {
|
||||
appendElement("p", {})
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalUnsignedTypes::class)
|
||||
fun main() {
|
||||
console.log("Web app started")
|
||||
val client = HttpClient()
|
||||
@@ -38,7 +39,7 @@ fun main() {
|
||||
scope.launchSafelyWithoutExceptions {
|
||||
val response = client.post("$baseUrl/check") {
|
||||
setBody(
|
||||
Json { }.encodeToString(
|
||||
Json.encodeToString(
|
||||
WebAppDataWrapper.serializer(),
|
||||
WebAppDataWrapper(webApp.initData, webApp.initDataUnsafe.hash)
|
||||
)
|
||||
|
Reference in New Issue
Block a user