achievement test output
This commit is contained in:
parent
22d28908d9
commit
9c692f7432
2 changed files with 19 additions and 2 deletions
|
@ -128,7 +128,14 @@ class ScoreControllerProvider implements ControllerProviderInterface
|
|||
$hits_array[$hit_player_id] = $hit->getId();
|
||||
}
|
||||
|
||||
return new JsonResponse(['success' => true, 'id' => $game->getId(), 'hits' => $hits_array], 200);
|
||||
$achievement_ids = [];
|
||||
foreach($game->getAchievements() as $achievement) {
|
||||
$achievement_ids[] = $achievement->getId();
|
||||
}
|
||||
|
||||
$achievement_ids = [2]; // override for test purpose
|
||||
|
||||
return new JsonResponse(['success' => true, 'id' => $game->getId(), 'hits' => $hits_array, 'achievements' => $achievement_ids], 200);
|
||||
});
|
||||
|
||||
return $controllers;
|
||||
|
|
|
@ -19,7 +19,7 @@ class Achievement
|
|||
/**
|
||||
* @var integer
|
||||
*
|
||||
* @ORM\Column(name="id")
|
||||
* @ORM\Column(name="id",type="integer")
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
*/
|
||||
|
@ -62,4 +62,14 @@ class Achievement
|
|||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of id.
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue