Update costs router in API to include prefix for improved endpoint organization and clarity.

This commit is contained in:
mohamad 2025-05-08 23:37:54 +02:00
parent 4283fe8a19
commit f6a50e0d6a
2 changed files with 2 additions and 2 deletions

View File

@ -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(lists.router, prefix="/lists", tags=["Lists"])
api_router_v1.include_router(items.router, tags=["Items"]) 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(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) api_router_v1.include_router(financials.router)
# Add other v1 endpoint routers here later # Add other v1 endpoint routers here later
# e.g., api_router_v1.include_router(users.router, prefix="/users", tags=["Users"]) # e.g., api_router_v1.include_router(users.router, prefix="/users", tags=["Users"])

View File

@ -69,7 +69,7 @@ async def get_list_cost_summary(
select(ListModel) select(ListModel)
.options( .options(
selectinload(ListModel.items).options(selectinload(ItemModel.added_by_user)), 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) selectinload(ListModel.creator)
) )
.where(ListModel.id == list_id) .where(ListModel.id == list_id)