Spaces:
Running
Running
发布任务最低价格为0
Browse files- 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 <
|
| 280 |
-
raise HTTPException(status_code=400, detail="任务价格不能低于
|
| 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()
|