diff --git a/webapp/controller/TeamController.class.php b/webapp/controller/TeamController.class.php index b5e28aeb..83bc5fa0 100644 --- a/webapp/controller/TeamController.class.php +++ b/webapp/controller/TeamController.class.php @@ -97,6 +97,71 @@ class TeamController extends BaseAuthedController { $this->_rspOk(); } + public function kickout() + { + $teamUuid = getReqVal('team_uuid', ''); + $r = $this->_getRedis($teamUuid); + $teamDb = $this->readTeamDb($r, $teamUuid); + if (empty($teamDb)) { + $this->_rspOk(); + return; + } + $this->saveTeamDb($r, $teamUuid, $teamDb); + $this->_rspOk(); + } + + public function closeSlot() + { + $teamUuid = getReqVal('team_uuid', ''); + $r = $this->_getRedis($teamUuid); + $teamDb = $this->readTeamDb($r, $teamUuid); + if (empty($teamDb)) { + $this->_rspOk(); + return; + } + $this->saveTeamDb($r, $teamUuid, $teamDb); + $this->_rspOk(); + } + + public function openSlot() + { + $teamUuid = getReqVal('team_uuid', ''); + $r = $this->_getRedis($teamUuid); + $teamDb = $this->readTeamDb($r, $teamUuid); + if (empty($teamDb)) { + $this->_rspOk(); + return; + } + $this->saveTeamDb($r, $teamUuid, $teamDb); + $this->_rspOk(); + } + + public function handover() + { + $teamUuid = getReqVal('team_uuid', ''); + $r = $this->_getRedis($teamUuid); + $teamDb = $this->readTeamDb($r, $teamUuid); + if (empty($teamDb)) { + $this->_rspOk(); + return; + } + $this->saveTeamDb($r, $teamUuid, $teamDb); + $this->_rspOk(); + } + + public function cancel() + { + $teamUuid = getReqVal('team_uuid', ''); + $r = $this->_getRedis($teamUuid); + $teamDb = $this->readTeamDb($r, $teamUuid); + if (empty($teamDb)) { + $this->_rspOk(); + return; + } + $this->saveTeamDb($r, $teamUuid, $teamDb); + $this->_rspOk(); + } + public function startGame() { $teamUuid = getReqVal('team_uuid', '');