项目积分不足直接返回
This commit is contained in:
@@ -271,6 +271,9 @@ async def optimize(
|
||||
db: AsyncSession = Depends(get_db),
|
||||
):
|
||||
record = None
|
||||
# 积分不足直接返回
|
||||
if (current_user.credits or 0) < 5:
|
||||
raise HTTPException(status_code=402, detail="积分不足,请充值")
|
||||
# Validate parameters based on generation type
|
||||
if req.gen_type == GenerationType.video:
|
||||
if req.duration not in DURATIONS:
|
||||
|
||||
Reference in New Issue
Block a user