@@ -76,6 +76,9 @@ async def _check_marketplace_access(self, user_id: str, collection_id: str) -> d
7676 # Check subscription status (optional - might be None)
7777 subscription = await self .db_ops .get_user_subscription_by_collection_id (user_id , collection_id )
7878
79+ # Get subscription count for this collection
80+ subscription_count = await self .db_ops .get_collection_subscription_count (marketplace .id )
81+
7982 return {
8083 "collection_id" : collection .id ,
8184 "collection_title" : collection .title ,
@@ -85,6 +88,7 @@ async def _check_marketplace_access(self, user_id: str, collection_id: str) -> d
8588 "owner_username" : owner .username ,
8689 "subscription_id" : subscription .id if subscription else None ,
8790 "gmt_subscribed" : subscription .gmt_subscribed if subscription else None ,
91+ "subscription_count" : subscription_count ,
8892 "is_subscribed" : subscription is not None ,
8993 "is_owner" : collection .user == user_id ,
9094 }
@@ -107,6 +111,7 @@ async def get_marketplace_collection(self, user_id: str, collection_id: str) ->
107111 owner_username = marketplace_info ["owner_username" ],
108112 subscription_id = marketplace_info ["subscription_id" ],
109113 gmt_subscribed = marketplace_info ["gmt_subscribed" ],
114+ subscription_count = marketplace_info ["subscription_count" ],
110115 config = shared_config ,
111116 )
112117
0 commit comments