Skip to content

Commit

Permalink
fix API key creation reponse type
Browse files Browse the repository at this point in the history
  • Loading branch information
Pwuts committed Sep 24, 2024
1 parent 125b1f3 commit 2e3c140
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ async def create_api_key_credentials(
expires_at: Annotated[
int | None, Body(title="Unix timestamp when the key expires")
] = None,
):
) -> APIKeyCredentials:
new_credentials = APIKeyCredentials(
provider=provider,
api_key=SecretStr(api_key),
Expand All @@ -163,7 +163,7 @@ async def create_api_key_credentials(
raise HTTPException(
status_code=500, detail=f"Failed to store credentials: {str(e)}"
)
return {"id": new_credentials.id}
return new_credentials


@router.delete("/{provider}/credentials/{cred_id}", status_code=204)
Expand Down

0 comments on commit 2e3c140

Please sign in to comment.