ZHIWEI666 commited on
Commit
878c2b6
·
verified ·
1 Parent(s): 7e86550

发布任务最低价格为0

Browse files
Files changed (1) hide show
  1. router_tasks.py +2 -2
router_tasks.py CHANGED
@@ -276,8 +276,8 @@ async def create_task(task: TaskCreate, current_user: str = Depends(require_auth
276
  raise HTTPException(status_code=400, detail="订金比例必须是 10/20/30/50 之一")
277
 
278
  # 验证价格
279
- if task.totalPrice < 10:
280
- raise HTTPException(status_code=400, detail="任务价格不能低于10积分")
281
 
282
  # 💳 使用SQL钱包检查余额并冻结
283
  wallet = db_session.query(Wallet).filter(Wallet.account == current_user).with_for_update().first()
 
276
  raise HTTPException(status_code=400, detail="订金比例必须是 10/20/30/50 之一")
277
 
278
  # 验证价格
279
+ if task.totalPrice < 0:
280
+ raise HTTPException(status_code=400, detail="任务价格不能低于0积分")
281
 
282
  # 💳 使用SQL钱包检查余额并冻结
283
  wallet = db_session.query(Wallet).filter(Wallet.account == current_user).with_for_update().first()