Skip to content

Commit

Permalink
feat: add user_name to TakeActionResponseModel
Browse files Browse the repository at this point in the history
  • Loading branch information
martastain committed Jul 11, 2024
1 parent c7afdae commit 82c4deb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions api/actions/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,12 @@ class TakeResponseModel(OPModel):
title="Action Variant",
example="production",
)
user_name: str = Field(
...,
title="User Name",
description="The user who initiated the action",
example="john.doe",
)


@router.get("/take/{token}")
Expand Down Expand Up @@ -228,6 +234,7 @@ async def take_action(
addon_version=event["summary"].get("addon_version", ""),
variant=event["summary"].get("variant", ""),
action_identifier=event["summary"].get("action_identifier", ""),
user_name=event["user_name"],
)

await Postgres.execute(
Expand Down

0 comments on commit 82c4deb

Please sign in to comment.