update
This commit is contained in:
parent
d5022e5892
commit
bbc0f445b8
@ -64,8 +64,11 @@ async def tryon(
|
||||
status=TryonStatus.GENERATING
|
||||
)
|
||||
db.add(tryon_history)
|
||||
|
||||
# 更新试穿次数
|
||||
current_user.tryon_remain_count -= 1
|
||||
await db.commit()
|
||||
return StandardResponse(code=200, message="试穿任务已提交", data=tryon_history.id)
|
||||
return StandardResponse(code=200, message="试穿任务已提交", data={"tryon_history_id": tryon_history.id, "tryon_remain_count": current_user.tryon_remain_count})
|
||||
else:
|
||||
return StandardResponse(code=500, message="试穿任务提交失败")
|
||||
|
||||
|
||||
@ -12,8 +12,8 @@ class Settings(BaseSettings):
|
||||
PROJECT_VERSION: str = "0.1.0"
|
||||
|
||||
# 试穿次数
|
||||
TRYON_REMAIN_COUNT: int = 5
|
||||
TRYON_ADDITIONAL_COUNT: int = 3
|
||||
TRYON_REMAIN_COUNT: int = 3
|
||||
TRYON_ADDITIONAL_COUNT: int = 1
|
||||
|
||||
# 默认头像
|
||||
DEFAULT_AVATAR: str = "https://aidress-1311994147.cos.ap-chengdu.myqcloud.com/uploads/20250415/a9fecdb0fa3549488f010f7b89fdef1c.png"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user