Fix score creation on Game
This commit is contained in:
parent
37a14f567b
commit
a7f0415eb4
1 changed files with 4 additions and 2 deletions
|
@ -75,8 +75,6 @@ class ScoreControllerProvider implements ControllerProviderInterface
|
|||
return new JsonResponse(['success' => false, 'message' => "Invalid target for hit"], 400);
|
||||
}
|
||||
|
||||
// set game appends hit to game
|
||||
$hit->setGame($game);
|
||||
$hit->setTarget($target);
|
||||
|
||||
$hit->setScore($data_hit['score']);
|
||||
|
@ -101,6 +99,10 @@ class ScoreControllerProvider implements ControllerProviderInterface
|
|||
$hit->setPoint($i, $data_hit['points']["$i"]['x'], $data_hit['points']["$i"]['y']);
|
||||
}
|
||||
|
||||
|
||||
// set game appends hit to game
|
||||
$hit->setGame($game);
|
||||
|
||||
$map_hits[$data_hit['id']] = $hit;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue