Skip to content

Commit

Permalink
Explain why we are loading a different route without contest ID.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicky Gerritsen committed Mar 13, 2024
1 parent 871e45d commit ae3d6ea
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions webapp/src/Controller/API/AbstractRestController.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ protected function renderCreateData(
$postfix = '';
if ($routeType !== 'user') {
$params['cid'] = $request->attributes->get('cid');
// If we request any entity without contest, we need to use the rout postfixed with _1,
// which is the route without the contest in the URL.
if ($params['cid'] === null) {
$postfix = '_1';
}
Expand Down

0 comments on commit ae3d6ea

Please sign in to comment.