Skip to content

Commit 4f5b805

Browse files
committed
refactor: update Donke API calls to include API key in query parameters for signup and subscription notifications
1 parent be710d8 commit 4f5b805

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

backend/airweave/api/v1/endpoints/organizations.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -672,12 +672,11 @@ async def _notify_donke_signup(
672672
else:
673673
plan = "developer"
674674

675-
# Simple HTTP call to Donke
675+
# Simple HTTP call to Donke (uses Azure app key)
676676
async with httpx.AsyncClient() as client:
677677
await client.post(
678-
f"{settings.DONKE_URL}/api/notify-signup",
678+
f"{settings.DONKE_URL}/api/notify-signup?code={settings.DONKE_API_KEY}",
679679
headers={
680-
"Authorization": f"Bearer {settings.DONKE_API_KEY}",
681680
"Content-Type": "application/json",
682681
},
683682
json={

backend/airweave/billing/webhook_handler.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -940,9 +940,8 @@ async def _notify_donke_subscription(
940940
try:
941941
async with httpx.AsyncClient() as client:
942942
await client.post(
943-
f"{settings.DONKE_URL}/api/notify-subscription",
943+
f"{settings.DONKE_URL}/api/notify-subscription?code={settings.DONKE_API_KEY}",
944944
headers={
945-
"Authorization": f"Bearer {settings.DONKE_API_KEY}",
946945
"Content-Type": "application/json",
947946
},
948947
json={
@@ -1012,9 +1011,8 @@ async def _send_team_welcome_email(
10121011
# Call Donke to send the welcome email
10131012
async with httpx.AsyncClient() as client:
10141013
await client.post(
1015-
f"{settings.DONKE_URL}/api/send-team-welcome-email",
1014+
f"{settings.DONKE_URL}/api/send-team-welcome-email?code={settings.DONKE_API_KEY}",
10161015
headers={
1017-
"Authorization": f"Bearer {settings.DONKE_API_KEY}",
10181016
"Content-Type": "application/json",
10191017
},
10201018
json={

0 commit comments

Comments
 (0)