Notify users after Tribute payment
This commit is contained in:
@@ -33,6 +33,7 @@ from bot.services.referral_service import ReferralService
|
||||
from bot.services.promo_code_service import PromoCodeService
|
||||
|
||||
from bot.handlers.user import payment as user_payment_webhook_module
|
||||
from bot.handlers.webhooks import tribute as tribute_webhook_module
|
||||
|
||||
|
||||
class DBSessionMiddleware(BaseMiddleware):
|
||||
@@ -327,6 +328,14 @@ async def run_bot(settings_param: Settings):
|
||||
logging.info(
|
||||
f"YooKassa webhook route configured at: [POST] {yk_path}")
|
||||
|
||||
tribute_path = settings_param.tribute_webhook_path
|
||||
if tribute_path.startswith('/'):
|
||||
app.router.add_post(
|
||||
tribute_path,
|
||||
tribute_webhook_module.tribute_webhook_route)
|
||||
logging.info(
|
||||
f"Tribute webhook route configured at: [POST] {tribute_path}")
|
||||
|
||||
web_app_runner = web.AppRunner(app)
|
||||
await web_app_runner.setup()
|
||||
site = web.TCPSite(web_app_runner,
|
||||
|
||||
Reference in New Issue
Block a user