getContent(), true, 512, JSON_THROW_ON_ERROR); $queryString = $query['search']; } catch (\JsonException $e) { throw $this->createNotFoundException(); } $dates = $this->teamerRepository->getAutocompletionData($queryString); return $this->json($dates); } /** * Season assignments are only ever made for all-season teamers, so their form must not be * able to offer anybody else. */ #[Route('/admin/autocomplete/season-teamer', name: 'app_admin_autocomplete_season_teamer')] #[IsGranted('ROLE_ADMINISTRATIVE')] public function season(Request $request): JsonResponse { try { $query = json_decode($request->getContent(), true, 512, JSON_THROW_ON_ERROR); $queryString = $query['search']; } catch (\JsonException $e) { throw $this->createNotFoundException(); } return $this->json($this->teamerRepository->getAutocompletionData($queryString, true)); } }