moved saving to UserPlayedPlace to seperate function
Some checks failed
default-pipeline default-pipeline #171
Some checks failed
default-pipeline default-pipeline #171
This commit is contained in:
parent
fb7c0e7a5c
commit
7143c7ec63
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user