mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-05 02:41:56 +00:00
feat(team_endpoints): Add query parameter key_limit to /team/info
This commit is contained in:
parent
aaf1e2444b
commit
807965c103
2 changed files with 5 additions and 0 deletions
|
|
@ -3470,6 +3470,9 @@ async def team_info(
|
|||
team_id: str = fastapi.Query(
|
||||
default=None, description="Team ID in the request parameters"
|
||||
),
|
||||
key_limit: int = fastapi.Query(
|
||||
default=None, description="Limit the number of keys returned"
|
||||
),
|
||||
user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
|
||||
):
|
||||
"""
|
||||
|
|
@ -3525,6 +3528,7 @@ async def team_info(
|
|||
table_name="key",
|
||||
query_type="find_all",
|
||||
expires=datetime.now(),
|
||||
limit=key_limit,
|
||||
)
|
||||
|
||||
if keys is None:
|
||||
|
|
|
|||
|
|
@ -3378,6 +3378,7 @@ class PrismaClient:
|
|||
r.expires = r.expires.isoformat()
|
||||
elif query_type == "find_all" and team_id is not None:
|
||||
response = await VerificationTokenRepository(self).table.find_many(
|
||||
take=limit,
|
||||
where={"team_id": team_id},
|
||||
include={"litellm_budget_table": True},
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue