feat: webhook backend

This commit is contained in:
Timothy J. Baek 2024-03-20 18:35:02 -07:00
parent 16fe0ee167
commit 2c6e2d5e8a
6 changed files with 60 additions and 2 deletions

11
backend/utils/webhook.py Normal file
View file

@ -0,0 +1,11 @@
import requests
def post_webhook(url: str, json: dict) -> bool:
try:
r = requests.post(url, json=json)
r.raise_for_status()
return True
except Exception as e:
print(e)
return False