mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +00:00
(fix) /key/delete
This commit is contained in:
parent
707c1e698c
commit
0250492d95
2 changed files with 6 additions and 7 deletions
|
|
@ -167,12 +167,8 @@ class GenerateKeyResponse(LiteLLMBase):
|
|||
user_id: str
|
||||
|
||||
|
||||
class _DeleteKeyObject(LiteLLMBase):
|
||||
key: str
|
||||
|
||||
|
||||
class DeleteKeyRequest(LiteLLMBase):
|
||||
keys: List[_DeleteKeyObject]
|
||||
keys: List[str]
|
||||
|
||||
|
||||
class NewUserRequest(GenerateKeyRequest):
|
||||
|
|
|
|||
|
|
@ -2045,8 +2045,11 @@ async def delete_key_fn(request: Request, data: DeleteKeyRequest):
|
|||
try:
|
||||
keys = data.keys
|
||||
|
||||
deleted_keys = await delete_verification_token(tokens=keys)
|
||||
assert len(keys) == deleted_keys
|
||||
result = await delete_verification_token(tokens=keys)
|
||||
verbose_proxy_logger.debug("/key/delete - deleted_keys=", result)
|
||||
|
||||
number_deleted_keys = len(result["deleted_keys"])
|
||||
assert len(keys) == number_deleted_keys
|
||||
return {"deleted_keys": keys}
|
||||
except Exception as e:
|
||||
raise HTTPException(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue