Commit f356dc17 authored by SpinShare's avatar SpinShare

added md5 for mappool check

parent 2e2dd6a3
...@@ -26,7 +26,11 @@ class APITournamentController extends AbstractController ...@@ -26,7 +26,11 @@ class APITournamentController extends AbstractController
$tournamentCharts = $em->getRepository(Song::class)->findBy(array('isTournament' => true)); $tournamentCharts = $em->getRepository(Song::class)->findBy(array('isTournament' => true));
foreach($tournamentCharts as $tournamentChart) { foreach($tournamentCharts as $tournamentChart) {
$data[] = $tournamentChart->getJSON(); $chartItem = $tournamentChart->getJSON();
$chartItem['srtbMD5'] = md5_file($this->getParameter('srtb_path').DIRECTORY_SEPARATOR.$tournamentChart->getFileReference().".srtb");
$data[] = $chartItem;
} }
$response = new JsonResponse(['version' => $this->getParameter('api_version'), 'status' => 200, 'data' => $data]); $response = new JsonResponse(['version' => $this->getParameter('api_version'), 'status' => 200, 'data' => $data]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment