diff --git a/kibicara/kibicara.py b/kibicara/kibicara.py index e219d45..0941b91 100644 --- a/kibicara/kibicara.py +++ b/kibicara/kibicara.py @@ -57,6 +57,8 @@ class Main: app = FastAPI() server_config = Config() server_config.accesslog = '-' + if config['production']: + server_config.bind = ['0.0.0.0:8000', '[::]:8000'] app.include_router(router, prefix='/api') if not config['production'] and config['cors_allow_origin']: app.add_middleware( diff --git a/kibicara/platforms/telegram/webapi.py b/kibicara/platforms/telegram/webapi.py index 93a5c6b..07e8c0d 100644 --- a/kibicara/platforms/telegram/webapi.py +++ b/kibicara/platforms/telegram/webapi.py @@ -55,7 +55,7 @@ async def telegram_read_all_public(hood=Depends(get_hood_unauthorized)): return [ BodyTelegramPublic(username=telegrambot.username) for telegrambot in telegrambots - if telegrambot.enabled == 1 + if telegrambot.enabled == 1 and telegrambot.username ]