v1.2.13: 用户管理功能增强/登录优化/数据库连接池优化
This commit is contained in:
parent
8662fbc625
commit
fadb0e5b4f
|
|
@ -0,0 +1 @@
|
|||
1.2.13
|
||||
|
|
@ -121,6 +121,7 @@ def get_collections(
|
|||
sortBy: str = Query('createdAt'),
|
||||
sortOrder: str = Query('desc'),
|
||||
all_users: bool = Query(False, description="return all users data for admin"),
|
||||
user_id: str = Query(None, description="filter by user id"),
|
||||
current_user: User = Depends(get_current_user),
|
||||
db: Session = Depends(get_db)
|
||||
):
|
||||
|
|
@ -138,6 +139,10 @@ def get_collections(
|
|||
else:
|
||||
query = db.query(Collection).filter(Collection.f99_91_user_id == current_user.f99_90_id)
|
||||
|
||||
# 如果指定了user_id参数,则只返回该用户的藏品
|
||||
if user_id:
|
||||
query = query.filter(Collection.f99_91_user_id == user_id)
|
||||
|
||||
if category:
|
||||
query = query.filter(Collection.f01_03_category == category)
|
||||
if status:
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
VERSION=1.2.12
|
||||
1.2.13
|
||||
|
|
|
|||
Loading…
Reference in New Issue