feature/avoid-repeating-places-in-game #38

Merged
balazs merged 14 commits from feature/avoid-repeating-places-in-game into develop 2021-05-09 10:58:54 +02:00
Showing only changes of commit 7143c7ec63 - Show all commits

View File

@ -152,7 +152,16 @@ class GameFlowController
$session->set('state', $state);
$this->saveVisit($last);
return new JsonContent($response, $last);
}
// save the selected place for the round in UserPlayedPlace
private function saveVisit($last): void
{
$session = $this->request->session();
$userId = $session->get('userId');
if(isset($userId)) {
$placeId = $last['placeId'];
@ -167,8 +176,6 @@ class GameFlowController
$userPlayedPlace->setLastTimeDate(new DateTime());
$this->pdm->saveToDb($userPlayedPlace);
}
return new JsonContent($response);
}
public function multiGuess(): IContent