mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
feat(proxy_server.py): enable new /team/disable
endpoint
reject all requests from this team id, without deleting it.
This commit is contained in:
parent
ea8f6672c5
commit
4f7ba902d8
5 changed files with 35 additions and 6 deletions
|
@ -6151,6 +6151,26 @@ async def team_info(
|
|||
)
|
||||
|
||||
|
||||
@router.post(
|
||||
"/team/disable", tags=["team management"], dependencies=[Depends(user_api_key_auth)]
|
||||
)
|
||||
async def disable_team(
|
||||
data: DeleteTeamRequest,
|
||||
user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
|
||||
):
|
||||
"""
|
||||
Sets
|
||||
"""
|
||||
global prisma_client
|
||||
|
||||
if prisma_client is None:
|
||||
raise Exception("No DB Connected.")
|
||||
|
||||
await prisma_client.db.litellm_teamtable.update_many(
|
||||
where={"team_id": {"in": data.team_ids}}, data={"disabled": True}
|
||||
)
|
||||
|
||||
|
||||
#### ORGANIZATION MANAGEMENT ####
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue