(feat) proxy add pagination on /user/info endpoint

This commit is contained in:
ishaan-jaff 2024-02-29 12:30:47 -08:00
parent 7d26eaf481
commit 432ce90a9a
2 changed files with 16 additions and 2 deletions

View file

@ -613,6 +613,10 @@ class PrismaClient:
query_type: Literal["find_unique", "find_all"] = "find_unique",
expires: Optional[datetime] = None,
reset_at: Optional[datetime] = None,
offset: Optional[int] = None, # pagination, what row number to start from
limit: Optional[
int
] = None, # pagination, number of rows to getch when find_all==True
):
try:
response: Any = None
@ -748,7 +752,7 @@ class PrismaClient:
)
else:
response = await self.db.litellm_usertable.find_many( # type: ignore
order={"spend": "desc"},
order={"spend": "desc"}, take=limit, skip=offset
)
return response
elif table_name == "spend":