Skip to content

Commit 71518bc

Browse files
committed
✨ Add filters parameter to list_latest_catalog_services and list_user_service_release_history functions
1 parent 1727258 commit 71518bc

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

services/catalog/src/simcore_service_catalog/service/catalog_services.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
from ..clients.director import DirectorClient
3333
from ..models.services_db import (
3434
ServiceAccessRightsAtDB,
35+
ServiceFiltersDB,
3536
ServiceMetaDataDBPatch,
3637
ServiceWithHistoryDBGet,
3738
)
@@ -134,11 +135,16 @@ async def list_latest_catalog_services(
134135
user_id: UserID,
135136
limit: PageLimitInt | None,
136137
offset: NonNegativeInt = 0,
138+
filters: ServiceFiltersDB | None = None,
137139
) -> tuple[PageTotalCount, list[LatestServiceGet]]:
138140

139141
# defines the order
140142
total_count, services = await repo.list_latest_services(
141-
product_name=product_name, user_id=user_id, limit=limit, offset=offset
143+
product_name=product_name,
144+
user_id=user_id,
145+
limit=limit,
146+
offset=offset,
147+
filters=filters,
142148
)
143149

144150
if services:
@@ -507,6 +513,8 @@ async def list_user_service_release_history(
507513
# pagination
508514
limit: PageLimitInt | None = None,
509515
offset: NonNegativeInt | None = None,
516+
# filters
517+
filters: ServiceFiltersDB | None = None,
510518
# options
511519
include_compatibility: bool = False,
512520
) -> tuple[PageTotalCount, list[ServiceRelease]]:
@@ -519,6 +527,7 @@ async def list_user_service_release_history(
519527
key=service_key,
520528
limit=limit,
521529
offset=offset,
530+
filters=filters,
522531
)
523532

524533
compatibility_map: dict[ServiceVersion, Compatibility | None] = {}

0 commit comments

Comments
 (0)