[add] Telegram webhook auto config

This commit is contained in:
2022-05-09 18:47:24 -06:00
parent 4c7d8f0dd7
commit 8ec335a9d8
6 changed files with 233 additions and 341 deletions

6
app.py
View File

@@ -10,6 +10,7 @@ from paraphrasing_bot.app import app
from paraphrasing_bot.src.domain.exceptions.HandledWithMessageException import HandledWithMessageException
from paraphrasing_bot.src.services import Config
from paraphrasing_bot.src.routes.generic import generic_blueprint
from paraphrasing_bot.src.applications.Bootstrap import Bootstrap as BootstrapApplication
# Load the .env file in case that it has been used to set envs
# instead of injecting them through docker
@@ -31,6 +32,11 @@ def log_request_info():
custom_logger.debug(request_data)
@app.before_first_request
def initial_setup():
BootstrapApplication()
# Loading blueprints
app.register_blueprint(generic_blueprint)