Skip to content

Commit

Permalink
Merge pull request #56 from City-of-Helsinki/UHF-X-disable-etusivu-in…
Browse files Browse the repository at this point in the history
…validation

Use active project so we can remove environment id
  • Loading branch information
tuutti authored Apr 26, 2024
2 parents 02b79c1 + 3590204 commit eb20060
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ApiManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function update(string $langcode, array $data) : ApiResponse {
throw new ConfigException('Missing "helfi_navigation.api" key setting.');
}

$endpoint = sprintf('%s/%s', static::GLOBAL_MENU_ENDPOINT, $this->environmentResolver->getActiveEnvironment()->getId());
$endpoint = sprintf('%s/%s', static::GLOBAL_MENU_ENDPOINT, $this->environmentResolver->getActiveProject()->getName());
$url = $this->getUrl('api', $langcode, ['endpoint' => $endpoint]);

return $this->client->makeRequest('POST', $url, [
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/rest/resource/GlobalMobileMenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ public function get(): ResourceResponse {
}

$projectName = $this->environmentResolver
->getActiveEnvironment()
->getId();
->getActiveProject()
->getName();
$site_name = $this->configFactory->get('system.site')->get('name');

// Create menu tree and add data to the local menu.
Expand Down

0 comments on commit eb20060

Please sign in to comment.