mirror of
https://github.com/whekin/household-bot.git
synced 2026-03-31 22:24:02 +00:00
feat(miniapp): add telegram-authenticated shell
This commit is contained in:
13
apps/miniapp/src/runtime-config.ts
Normal file
13
apps/miniapp/src/runtime-config.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
declare global {
|
||||
interface Window {
|
||||
__HOUSEHOLD_CONFIG__?: {
|
||||
botApiUrl?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function runtimeBotApiUrl(): string | undefined {
|
||||
const configured = window.__HOUSEHOLD_CONFIG__?.botApiUrl?.trim()
|
||||
|
||||
return configured && configured.length > 0 ? configured : undefined
|
||||
}
|
||||
Reference in New Issue
Block a user