🔍 chore(store.py): add support for filtering by is_component parameter in search_endpoint function
🔍 chore(service.py): add support for filtering by is_component parameter in StoreService class
This commit is contained in:
parent
8e032b930b
commit
bf775eaaad
2 changed files with 5 additions and 0 deletions
|
|
@ -130,6 +130,7 @@ async def search_endpoint(
|
|||
page: int = Query(1),
|
||||
limit: int = Query(10),
|
||||
status: Optional[str] = Query(None),
|
||||
is_component: Optional[bool] = Query(None),
|
||||
tags: Optional[List[str]] = Query(None),
|
||||
date_from: Optional[datetime] = Query(None),
|
||||
date_to: Optional[datetime] = Query(None),
|
||||
|
|
@ -146,6 +147,7 @@ async def search_endpoint(
|
|||
page=page,
|
||||
limit=limit,
|
||||
status=status,
|
||||
is_component=is_component,
|
||||
tags=tags,
|
||||
date_from=date_from,
|
||||
date_to=date_to,
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ class StoreService(Service):
|
|||
page: int = 1,
|
||||
limit: int = 10,
|
||||
status: Optional[str] = None,
|
||||
is_component: Optional[bool] = None,
|
||||
tags: Optional[List[str]] = None,
|
||||
date_from: Optional[datetime] = None,
|
||||
date_to: Optional[datetime] = None,
|
||||
|
|
@ -102,6 +103,8 @@ class StoreService(Service):
|
|||
|
||||
if status:
|
||||
params["filter[status]"] = status
|
||||
if is_component:
|
||||
params["filter[is_component][_eq]"] = is_component
|
||||
|
||||
if tags:
|
||||
params["filter[tags][_in]"] = ",".join(tags)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue