update
This commit is contained in:
parent
df0a9e7ea6
commit
c30c864f5b
@ -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="试穿历史不存在")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user