This commit is contained in:
aaron 2025-04-14 20:15:32 +08:00
parent df0a9e7ea6
commit c30c864f5b

View File

@ -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="试穿历史不存在")