🐛 fix(api_key/crud.py): update create_api_key function to return the generated API key instead of the unmasked API key
This commit is contained in:
parent
2151f1e63f
commit
3d82647b4f
1 changed files with 3 additions and 1 deletions
|
|
@ -37,7 +37,9 @@ def create_api_key(
|
|||
session.add(api_key)
|
||||
session.commit()
|
||||
session.refresh(api_key)
|
||||
return UnmaskedApiKeyRead.from_orm(api_key)
|
||||
unmasked = UnmaskedApiKeyRead.from_orm(api_key)
|
||||
unmasked.api_key = generated_api_key
|
||||
return unmasked
|
||||
|
||||
|
||||
def delete_api_key(session: Session, api_key_id: UUID) -> None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue