Skip to content

Commit

Permalink
fix: no longer setting the discord webhoook url as global variable
Browse files Browse the repository at this point in the history
  • Loading branch information
elviskahoro committed Sep 30, 2024
1 parent caaf8ec commit 0876937
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pcweb/templates/docpage/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def handle_submit(self, form_data: dict):
json=form_data,
)

DISCORD_WEBHOOK_URL = os.environ.get("DISCORD_WEBHOOK_URL")
discord_webhook_url: str | None = os.environ.get("DISCORD_WEBHOOK_URL")
email: str = form_data.get("email", "")
discord_message = f"""
Contact: {email}
Expand All @@ -53,7 +53,7 @@ def handle_submit(self, form_data: dict):
try:
with httpx.Client() as client:
response: Response = client.post(
DISCORD_WEBHOOK_URL,
discord_webhook_url,
json=payload,
)
response.raise_for_status()
Expand Down

0 comments on commit 0876937

Please sign in to comment.