mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
Merge pull request #1843 from BerriAI/litellm_admin_ui_view_all_keys
feat(ui): enable admin to view all valid keys created on the proxy
This commit is contained in:
commit
2bc710d8e9
25 changed files with 331 additions and 229 deletions
|
@ -565,9 +565,20 @@ class PrismaClient:
|
|||
# The asterisk before `user_id_list` unpacks the list into separate arguments
|
||||
response = await self.db.query_raw(sql_query)
|
||||
elif query_type == "find_all":
|
||||
response = await self.db.litellm_usertable.find_many( # type: ignore
|
||||
order={"spend": "desc"},
|
||||
)
|
||||
if expires is not None:
|
||||
response = await self.db.litellm_usertable.find_many( # type: ignore
|
||||
order={"spend": "desc"},
|
||||
where={ # type:ignore
|
||||
"OR": [
|
||||
{"expires": None}, # type:ignore
|
||||
{"expires": {"gt": expires}}, # type:ignore
|
||||
],
|
||||
},
|
||||
)
|
||||
else:
|
||||
response = await self.db.litellm_usertable.find_many( # type: ignore
|
||||
order={"spend": "desc"},
|
||||
)
|
||||
return response
|
||||
elif table_name == "spend":
|
||||
verbose_proxy_logger.debug(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue