Commit 8a6581ec authored by Andreas Heimann's avatar Andreas Heimann

added zip URLs to api

parent be26e605
......@@ -69,6 +69,7 @@ class APIController extends AbstractController
$oneResult['hasExtremeDifficulty'] = $result->getHasExtremeDifficulty();
$oneResult['hasXDDifficulty'] = $result->getHasXDDifficulty();
$oneResult['cover'] = $baseUrl."/uploads/cover/".$result->getFileReference().".png";
$oneResult['zip'] = $this->generateUrl('api.songs.download', array('id' => $result->getId()), UrlGeneratorInterface::ABSOLUTE_URL);
$data[] = $oneResult;
}
......@@ -101,6 +102,7 @@ class APIController extends AbstractController
$oneResult['hasExtremeDifficulty'] = $result->getHasExtremeDifficulty();
$oneResult['hasXDDifficulty'] = $result->getHasXDDifficulty();
$oneResult['cover'] = $baseUrl."/uploads/cover/".$result->getFileReference().".png";
$oneResult['zip'] = $this->generateUrl('api.songs.download', array('id' => $result->getId()), UrlGeneratorInterface::ABSOLUTE_URL);
$data[] = $oneResult;
}
......@@ -276,6 +278,7 @@ class APIController extends AbstractController
$oneResult['hasExtremeDifficulty'] = $result->getHasExtremeDifficulty();
$oneResult['hasXDDifficulty'] = $result->getHasXDDifficulty();
$oneResult['cover'] = $baseUrl."/uploads/cover/".$result->getFileReference().".png";
$oneResult['zip'] = $this->generateUrl('api.songs.download', array('id' => $result->getId()), UrlGeneratorInterface::ABSOLUTE_URL);
$data['songs'][] = $oneResult;
}
......@@ -344,6 +347,7 @@ class APIController extends AbstractController
$oneResult['hasExtremeDifficulty'] = $result->getHasExtremeDifficulty();
$oneResult['hasXDDifficulty'] = $result->getHasXDDifficulty();
$oneResult['cover'] = $baseUrl."/uploads/cover/".$result->getFileReference().".png";
$oneResult['zip'] = $this->generateUrl('api.songs.download', array('id' => $result->getId()), UrlGeneratorInterface::ABSOLUTE_URL);
$data['songs'][] = $oneResult;
}
......@@ -380,6 +384,7 @@ class APIController extends AbstractController
$oneResult['hasExtremeDifficulty'] = $result->getHasExtremeDifficulty();
$oneResult['hasXDDifficulty'] = $result->getHasXDDifficulty();
$oneResult['cover'] = $baseUrl."/uploads/cover/".$result->getFileReference().".png";
$oneResult['zip'] = $this->generateUrl('api.songs.download', array('id' => $result->getId()), UrlGeneratorInterface::ABSOLUTE_URL);
$data['songs'][] = $oneResult;
}
......
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