fix config
This commit is contained in:
@@ -27,21 +27,21 @@ class Config(BaseSettings):
|
||||
API_PORT: int = 8000
|
||||
|
||||
TELEGRAM_WEBHOOK_DOMAIN: str = "localhost"
|
||||
TELEGRAM_WEBHOOK_SHEME: str = "https"
|
||||
TELEGRAM_WEBHOOK_SCHEME: str = "https"
|
||||
TELEGRAM_WEBHOOK_PORT: int = 443
|
||||
|
||||
@property
|
||||
def TELEGRAM_WEBHOOK_URL(self) -> str:
|
||||
return f"{self.TELEGRAM_WEBHOOK_SHEME}://{self.TELEGRAM_WEBHOOK_DOMAIN}{
|
||||
return f"{self.TELEGRAM_WEBHOOK_SCHEME}://{self.TELEGRAM_WEBHOOK_DOMAIN}{
|
||||
f':{self.TELEGRAM_WEBHOOK_PORT}'
|
||||
if (
|
||||
(
|
||||
self.TELEGRAM_WEBHOOK_PORT != 80
|
||||
and self.TELEGRAM_WEBHOOK_SHEME == 'http'
|
||||
and self.TELEGRAM_WEBHOOK_SCHEME == 'http'
|
||||
)
|
||||
or (
|
||||
self.TELEGRAM_WEBHOOK_PORT != 443
|
||||
and self.TELEGRAM_WEBHOOK_SHEME == 'https'
|
||||
and self.TELEGRAM_WEBHOOK_SCHEME == 'https'
|
||||
)
|
||||
)
|
||||
else ''
|
||||
|
||||
Reference in New Issue
Block a user