From f6a50e0d6a1921b549d4c81cfcc654bbb36a892e Mon Sep 17 00:00:00 2001 From: mohamad Date: Thu, 8 May 2025 23:37:54 +0200 Subject: [PATCH] Update costs router in API to include prefix for improved endpoint organization and clarity. --- be/app/api/v1/api.py | 2 +- be/app/api/v1/endpoints/costs.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/be/app/api/v1/api.py b/be/app/api/v1/api.py index 6988405..ac49730 100644 --- a/be/app/api/v1/api.py +++ b/be/app/api/v1/api.py @@ -21,7 +21,7 @@ api_router_v1.include_router(invites.router, prefix="/invites", tags=["Invites"] api_router_v1.include_router(lists.router, prefix="/lists", tags=["Lists"]) api_router_v1.include_router(items.router, tags=["Items"]) api_router_v1.include_router(ocr.router, prefix="/ocr", tags=["OCR"]) -api_router_v1.include_router(costs.router, tags=["Costs"]) +api_router_v1.include_router(costs.router, prefix="/costs", tags=["Costs"]) api_router_v1.include_router(financials.router) # Add other v1 endpoint routers here later # e.g., api_router_v1.include_router(users.router, prefix="/users", tags=["Users"]) \ No newline at end of file diff --git a/be/app/api/v1/endpoints/costs.py b/be/app/api/v1/endpoints/costs.py index ff6e158..1288dc8 100644 --- a/be/app/api/v1/endpoints/costs.py +++ b/be/app/api/v1/endpoints/costs.py @@ -69,7 +69,7 @@ async def get_list_cost_summary( select(ListModel) .options( selectinload(ListModel.items).options(selectinload(ItemModel.added_by_user)), - selectinload(ListModel.group).options(selectinload(GroupModel.user_associations).options(selectinload(UserGroupModel.user))), + selectinload(ListModel.group).options(selectinload(GroupModel.member_associations).options(selectinload(UserGroupModel.user))), selectinload(ListModel.creator) ) .where(ListModel.id == list_id)