mirror of
https://github.com/StanGirard/quivr.git
synced 2024-09-11 13:15:41 +03:00
Merge branch '315-api-key-gen-aauser-i-can-create-and-delete-an-api-key-with-the-fe-for-quivr' of https://github.com/StanGirard/quivr into 315-api-key-gen-aauser-i-can-create-and-delete-an-api-key-with-the-fe-for-quivr
This commit is contained in:
commit
dc98d3305e
@ -74,7 +74,7 @@ async def delete_api_key(key_id: str, commons: CommonsDep, current_user: User =
|
|||||||
|
|
||||||
@api_key_router.get("/api-keys", response_model=List[ApiKeyInfo], dependencies=[Depends(AuthBearer())])
|
@api_key_router.get("/api-keys", response_model=List[ApiKeyInfo], dependencies=[Depends(AuthBearer())])
|
||||||
async def get_api_keys(commons: CommonsDep, current_user: User = Depends(get_current_user)):
|
async def get_api_keys(commons: CommonsDep, current_user: User = Depends(get_current_user)):
|
||||||
"""Get all active API keys for current user."""
|
"""Get all active API keys for the current user. Return only the key_id and the creation_time."""
|
||||||
|
|
||||||
user_id = fetch_user_id_from_credentials(commons, time.strftime("%Y%m%d"), {"email": current_user.email})
|
user_id = fetch_user_id_from_credentials(commons, time.strftime("%Y%m%d"), {"email": current_user.email})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user