Skip to content

Commit

Permalink
Make WebhookConfig exclusive on url (#7835)
Browse files Browse the repository at this point in the history
Config objects need a an explicit unique property set, so instead of
using a synthetic random value, make it unique on the URL. This means
adding more events to the same URL is updating the event set rather than
having a separate config for that event.
  • Loading branch information
scotttrinh authored Oct 11, 2024
1 parent 887c5f4 commit 072f663
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions edb/lib/ext/auth.edgeql
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,8 @@ CREATE EXTENSION PACKAGE auth VERSION '1.0' {
create required property url: std::str {
create annotation std::description :=
"The url to send webhooks to.";

create constraint exclusive;
};

create required multi property events: ext::auth::WebhookEvent {
Expand Down

0 comments on commit 072f663

Please sign in to comment.