From 630fda271e673f3da7c06e8ec782b8f5c4a50d9b Mon Sep 17 00:00:00 2001 From: hujiabin Date: Tue, 25 Oct 2022 14:28:34 +0800 Subject: [PATCH] 1 --- webapp/controller/TeamController.class.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/webapp/controller/TeamController.class.php b/webapp/controller/TeamController.class.php index e1a805c2..afb6d296 100644 --- a/webapp/controller/TeamController.class.php +++ b/webapp/controller/TeamController.class.php @@ -252,6 +252,7 @@ class TeamController extends BaseAuthedController { public function openSlot() { $teamUuid = getReqVal('team_uuid', ''); + $slotNum = getReqVal('slot_num', 1); $r = $this->_getRedis($teamUuid); $teamDb = $this->readTeamDb($r, $teamUuid); if (empty($teamDb)) { @@ -264,11 +265,11 @@ class TeamController extends BaseAuthedController { return; } } - if ($teamDb['slot_num'] >= 4){ - $this->_rspErr(1, 'Maximum size of team'); - return; - } - $teamDb['slot_num']+=1; +// if ($teamDb['slot_num'] >= 4){ +// $this->_rspErr(1, 'Maximum size of team'); +// return; +// } + $teamDb['slot_num'] = $slotNum; $this->saveTeamDb($r, $teamUuid, $teamDb); $this->_rspOk(); }