Skip to content

Commit 12a0ca5

Browse files
committed
Do not convert webhook.site endpoints on export
1 parent 5825321 commit 12a0ca5

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

lib/sequin/transforms/transforms.ex

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -129,16 +129,6 @@ defmodule Sequin.Transforms do
129129
end
130130
end
131131

132-
def to_external(%HttpEndpoint{host: "webhook.site"} = http_endpoint, show_sensitive) do
133-
%{
134-
id: http_endpoint.id,
135-
name: http_endpoint.name,
136-
"webhook.site": true,
137-
headers: format_headers(http_endpoint.headers),
138-
encrypted_headers: encrypted_headers(http_endpoint, show_sensitive)
139-
}
140-
end
141-
142132
def to_external(%HttpEndpoint{use_local_tunnel: true} = http_endpoint, show_sensitive) do
143133
%{
144134
id: http_endpoint.id,

test/sequin/transforms_test.exs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,17 @@ defmodule Sequin.TransformsTest do
138138
endpoint =
139139
ConsumersFactory.http_endpoint(
140140
name: "webhook_endpoint",
141-
host: "webhook.site"
141+
host: "webhook.site",
142+
scheme: :https,
143+
path: "/some-uuid"
142144
)
143145

144146
json = Transforms.to_external(endpoint)
145147

146148
assert %{
147149
name: "webhook_endpoint",
148-
"webhook.site": true
149-
} = json
150+
url: "https://webhook.site/some-uuid"
151+
} = Map.take(json, [:name, :url])
150152
end
151153

152154
test "returns a map of local tunnel endpoint" do

0 commit comments

Comments
 (0)