Skip to content

Commit

Permalink
cqa
Browse files Browse the repository at this point in the history
  • Loading branch information
scotttrinh committed Oct 2, 2024
1 parent feca4c9 commit d9060ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions edb/server/protocol/auth_ext/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ class MagicLinkProviderConfig(ProviderConfig):
name: Literal["builtin::local_magic_link"]
token_time_to_live: statypes.Duration


@dataclass
class WebhookConfig:
events: list[str]
Expand Down
9 changes: 8 additions & 1 deletion edb/server/protocol/auth_ext/webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,11 @@ async def send(
)
result = json.loads(result_json)

return result[0]["id"]
match result[0]["id"]:
case str(id):
return id
case _:
raise ValueError(
"Expected single result with 'id' string property, got "
f"{result[0]!r}"
)

0 comments on commit d9060ce

Please sign in to comment.