kopia lustrzana https://github.com/bugout-dev/moonstream
Add limit and offset.
rodzic
aa0f2458d7
commit
9f2051688a
|
@ -238,7 +238,11 @@ async def delete_subscription_handler(request: Request, subscription_id: str):
|
|||
|
||||
|
||||
@router.get("/", tags=["subscriptions"], response_model=data.SubscriptionsListResponse)
|
||||
async def get_subscriptions_handler(request: Request) -> data.SubscriptionsListResponse:
|
||||
async def get_subscriptions_handler(
|
||||
request: Request,
|
||||
limit: Optional[int] = 10,
|
||||
offset: Optional[int] = 0,
|
||||
) -> data.SubscriptionsListResponse:
|
||||
"""
|
||||
Get user's subscriptions.
|
||||
"""
|
||||
|
@ -255,7 +259,8 @@ async def get_subscriptions_handler(request: Request) -> data.SubscriptionsListR
|
|||
token=token,
|
||||
collection_id=collection_id,
|
||||
required_field=[f"type:subscription"],
|
||||
limit=1000,
|
||||
limit=limit,
|
||||
offset=offset,
|
||||
)
|
||||
|
||||
# resources: BugoutResources = bc.list_resources(token=token, params=params)
|
||||
|
|
Ładowanie…
Reference in New Issue