Skip to content

Commit fd0346b

Browse files
committed
feat: fix shared collection page
1 parent e9c0f1e commit fd0346b

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

aperag/service/marketplace_collection_service.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

docs/design/document_upload_design.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,3 +1163,4 @@ ApeRAG's document upload module adopts a **two-phase commit + idempotency design
11631163

11641164
This design ensures performance while supporting complex document processing scenarios, with good scalability and fault tolerance.
11651165

1166+

web/docs/zh-CN/design/document_upload_design.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,3 +878,4 @@ ApeRAG的文档上传功能通过**三步引导流程**提供了直观且可靠
878878

879879
这种设计在保证功能完整性的同时,提供了出色的用户体验和系统稳定性。
880880

881+

0 commit comments

Comments
 (0)