@@ 241-255 (lines=15) @@ | ||
238 | return $jsonResponse; |
|
239 | } |
|
240 | ||
241 | public function songSearchApiAction(Request $request) |
|
242 | { |
|
243 | $this->setJsonErrorHandler(); |
|
244 | ||
245 | $searchString = $request->get('searchString'); |
|
246 | $searchCount = 10; |
|
247 | if ($request->get('searchCount')) { |
|
248 | $searchCount = $request->get('searchCount'); |
|
249 | } |
|
250 | $songs = $this->dataSource->findSongsBySearchString($searchString, $searchCount); |
|
251 | ||
252 | $jsonResponse = new JsonResponse(['ok' => 'ok', 'searchString' => $searchString, 'songs' => $songs]); |
|
253 | ||
254 | return $jsonResponse; |
|
255 | } |
|
256 | ||
257 | public function getPerformersAction() |
|
258 | { |
@@ 52-64 (lines=13) @@ | ||
49 | return new JsonResponse($show); |
|
50 | } |
|
51 | ||
52 | public function songSearchAction(Request $request) |
|
53 | { |
|
54 | $searchString = $request->get('searchString'); |
|
55 | $searchCount = 10; |
|
56 | if ($request->get('searchCount')) { |
|
57 | $searchCount = $request->get('searchCount'); |
|
58 | } |
|
59 | $songs = $this->getDataStore()->findSongsBySearchString($searchString, $searchCount); |
|
60 | ||
61 | $jsonResponse = new JsonResponse(['ok' => 'ok', 'searchString' => $searchString, 'songs' => $songs]); |
|
62 | ||
63 | return $jsonResponse; |
|
64 | } |
|
65 | ||
66 | public function useTicketAction(Request $request) |
|
67 | { |