Skip to content

Commit

Permalink
Merge pull request #1569 from ConductionNL/fix/MF-46/dynamic-path
Browse files Browse the repository at this point in the history
Make path prefix dynamic instead of only /klanten
  • Loading branch information
rjzondervan authored Oct 18, 2023
2 parents 4fa1334 + 49e5e34 commit 39c5b1b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/src/Controller/ZZController.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,18 @@ public function objectAction(
* @TODO This function needs to be more dynamic: /{item}/api/{path}.
* This function dynamically handles the custom endpoints.
*
* @Route("/klanten/api/{path}", name="dynamic_route_second", requirements={"path" = ".+"})
* @Route("/{prefix}/api/{path}", name="dynamic_route_second", requirements={"path" = ".+"})
*
* @param string|null $path
* @param string|null $bundle
* @param Request $request
* @param EndpointService $endpointService
* @return Response
* @throws Exception
*/
public function dynamicCustomAction(
?string $path,
?string $bundle,
Request $request,
EndpointService $endpointService
): Response {
Expand Down

0 comments on commit 39c5b1b

Please sign in to comment.