diff --git a/app/api/v1/tryon.py b/app/api/v1/tryon.py index 50a4565..5562de8 100644 --- a/app/api/v1/tryon.py +++ b/app/api/v1/tryon.py @@ -132,13 +132,12 @@ async def delete_tryon_history( @router.get("/history/{history_id}", tags=["tryon"]) async def get_tryon_history( history_id: int, - db: AsyncSession = Depends(deps.get_db), - current_user: User = Depends(get_current_user) + db: AsyncSession = Depends(deps.get_db) ): """ 获取试穿历史详情 """ - history = await db.execute(select(TryonHistory).where(TryonHistory.id == history_id, TryonHistory.user_id == current_user.id)) + history = await db.execute(select(TryonHistory).where(TryonHistory.id == history_id)) tryon_history = history.scalar_one_or_none() if not tryon_history: raise BusinessError(code=404, message="试穿历史不存在")