feat(proxy_server.py): enable new /team/disable endpoint

reject all requests from this team id, without deleting it.
This commit is contained in:
Krrish Dholakia 2024-03-26 15:40:50 -07:00
parent ea8f6672c5
commit 4f7ba902d8
5 changed files with 35 additions and 6 deletions

View file

@ -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 ####