| @@ 67-80 (lines=14) @@ | ||
| 64 | * @param Request $request |
|
| 65 | * @return JsonResponse |
|
| 66 | */ |
|
| 67 | public function getAction(Request $request) |
|
| 68 | { |
|
| 69 | $this->denyAccessUnlessGranted(['ROLE_RA']); |
|
| 70 | ||
| 71 | $identityId = $request->get('identityId'); |
|
| 72 | ||
| 73 | $raCandidate = $this->raCandidateService->findByIdentityId($identityId); |
|
| 74 | ||
| 75 | if ($raCandidate === null) { |
|
| 76 | throw new NotFoundHttpException(sprintf("RaCandidate with IdentityId '%s' does not exist", $identityId)); |
|
| 77 | } |
|
| 78 | ||
| 79 | return new JsonResponse($raCandidate); |
|
| 80 | } |
|
| 81 | } |
|
| 82 | ||
| @@ 43-54 (lines=12) @@ | ||
| 40 | $this->raListingService = $raListingService; |
|
| 41 | } |
|
| 42 | ||
| 43 | public function getAction($identityId) |
|
| 44 | { |
|
| 45 | $this->denyAccessUnlessGranted(['ROLE_RA']); |
|
| 46 | ||
| 47 | $raListing = $this->raListingService->findByIdentityId(new IdentityId($identityId)); |
|
| 48 | ||
| 49 | if ($raListing === null) { |
|
| 50 | throw new NotFoundHttpException(sprintf("RaListing '%s' does not exist", $identityId)); |
|
| 51 | } |
|
| 52 | ||
| 53 | return new JsonResponse($raListing); |
|
| 54 | } |
|
| 55 | ||
| 56 | public function searchAction(Request $request, Institution $institution) |
|
| 57 | { |
|