Skip to content

Commit

Permalink
Merge pull request #267 from destag/mailjet-webhook
Browse files Browse the repository at this point in the history
Wrap single mailjet webhook event
  • Loading branch information
tttp authored Jul 25, 2024
2 parents 31c2d76 + 17083b8 commit b220d4e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions proca/lib/proca_web/controllers/webhook_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,9 @@ defmodule ProcaWeb.WebhookController do
conn
|> send_resp(:ok, "")
end

def mailjet(conn, event) do
# If we receive a single event instead of list we should wrap it
mailjet(conn, %{"_json" => [event]})
end
end

0 comments on commit b220d4e

Please sign in to comment.