forked from phoenix/litellm-mirror
allow using hashed api keys on regen key
This commit is contained in:
parent
6b8bb69af3
commit
2615edc468
1 changed files with 5 additions and 1 deletions
|
@ -1008,6 +1008,10 @@ async def regenerate_key_fn(
|
|||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
|
||||
detail={"error": "DB not connected. prisma_client is None"},
|
||||
)
|
||||
|
||||
if "sk" not in key:
|
||||
hashed_api_key = key
|
||||
else:
|
||||
hashed_api_key = hash_token(key)
|
||||
|
||||
_key_in_db = await prisma_client.db.litellm_verificationtoken.find_unique(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue