This commit is contained in:
hujiabin 2022-10-25 14:28:34 +08:00
parent a3a75e60a1
commit 630fda271e

View File

@ -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();
}