Skip to content

Commit

Permalink
WebHooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Guhan-SenSam committed Jun 16, 2024
1 parent 50882a1 commit d3170ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webhook_handler/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
@receiver(post_save)
# Webhook triggered when a new candidate is created
def handle_model_update(sender, created, instance, **kwargs):
print("hello"*100)
if sender.__name__ == 'Candidate' and created:
# send a request to the webhook
url = os.environ.get("WEBHOOK_URL_NEW_CANDIDATE")
url = "https://discord.com/api/webhooks/1214916560590741564/lWDmGMRLd7cZ8Aa7-819ewdAPqUPgse6mRPGRDbtJmNom3EgSeXrKX13TODMasqYZ1fs"
data = {
"username": 'Oxlac HRMS',
"avatar_url": "https://oxlac.com/favicon.png",
Expand Down

0 comments on commit d3170ea

Please sign in to comment.