1
This commit is contained in:
parent
c541c4405c
commit
ab7fd27243
@ -193,11 +193,11 @@ class TeamController extends BaseAuthedController {
|
||||
public function closeSlot()
|
||||
{
|
||||
$teamUuid = getReqVal('team_uuid', '');
|
||||
$slot_id = getReqVal('slot_id', 0);
|
||||
if (! in_array($slot_id,array(1,2,3,4)) ){
|
||||
$this->_rspErr(1, 'slot_id param error');
|
||||
return;
|
||||
}
|
||||
// $slot_id = getReqVal('slot_id', 0);
|
||||
// if (! in_array($slot_id,array(1,2,3,4)) ){
|
||||
// $this->_rspErr(1, 'slot_id param error');
|
||||
// return;
|
||||
// }
|
||||
|
||||
$r = $this->_getRedis($teamUuid);
|
||||
$teamDb = $this->readTeamDb($r, $teamUuid);
|
||||
@ -215,16 +215,11 @@ class TeamController extends BaseAuthedController {
|
||||
$this->_rspErr(1, 'Minimum size of team');
|
||||
return;
|
||||
}
|
||||
if ($teamDb['member_list'][$slot_id-1]['account_id'] == $this->_getAccountId()){
|
||||
$this->_rspErr(1, 'do not get myself out of line');
|
||||
if (count($teamDb['member_list'])== 4){
|
||||
$this->_rspErr(1, "Can't shut down");
|
||||
return;
|
||||
}
|
||||
if(array_key_exists($slot_id-1,$teamDb['member_list'])){
|
||||
unset($teamDb['member_list'][$slot_id-1]);
|
||||
$teamDb['slot_num']-=1;
|
||||
}else{
|
||||
$teamDb['slot_num']-=1;
|
||||
}
|
||||
$teamDb['slot_num']-=1;
|
||||
$this->saveTeamDb($r, $teamUuid, $teamDb);
|
||||
$this->_rspOk();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user