Skip to content

Commit

Permalink
fix extraction of eci
Browse files Browse the repository at this point in the history
  • Loading branch information
b1conrad committed Nov 9, 2023
1 parent 20d4201 commit 284d954
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion krl/io.picolabs.plan.webhook.krl
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ td, th {
pre {
event_designation = event_domain + ":" + event_type
webhook = ent:webhooks.get(event_designation)
eci = webhook.extract(re#/sky/event/([^/]*)/#).head()
eciRE = re#/sky/event/([^/]*)/#
eci = webhook.get("uri").extract(eciRE).head()
}
if eci then wrangler:deleteChannel(eci)
fired {
Expand Down

1 comment on commit 284d954

@b1conrad
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doh. webhook was a Map and the extract operator is for a String, so get the String first.

Also clarify the pattern (Regular Expression) for extrancting an ECI from an event URI.

Please sign in to comment.