fix: using the same get_settings convention

This commit is contained in:
Luca Simone
2023-12-18 14:58:25 +01:00
parent 7a5acb29ac
commit e25980f141

View File

@ -34,7 +34,7 @@ async def handle_webhook(background_tasks: BackgroundTasks, request: Request):
data = await request.json()
get_logger().info(json.dumps(data))
webhook_secret = getattr(get_settings().bitbucket_server, "webhook_secret", None)
webhook_secret = get_settings().get("BITBUCKET_SERVER.WEBHOOK_SECRET", None)
if webhook_secret:
body_bytes = await request.body()
signature_header = request.headers.get("x-hub-signature", None)