Skip to content

Commit

Permalink
Refactor post_to_webhook function to include base URL in message
Browse files Browse the repository at this point in the history
  • Loading branch information
maxachis committed Jun 21, 2024
1 parent f605760 commit 2897b0e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions middleware/webhook_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
from middleware.util import get_env_variable


def post_to_webhook(data: str):
def post_to_webhook(msg: str):
vite_vue_app_base_url = get_env_variable("VITE_VUE_APP_BASE_URL")
webhook_url = get_env_variable("WEBHOOK_URL")

requests.post(
webhook_url,
data=data,
url=webhook_url,
data=f"({vite_vue_app_base_url}) {msg}",
headers={"Content-Type": "application/json"},
timeout=5,
)
Expand Down

0 comments on commit 2897b0e

Please sign in to comment.