Skip to content

Commit

Permalink
Remove graphQL suffix from BNF server env. DDFHER-165
Browse files Browse the repository at this point in the history
This is necessary, when we want to use the environment variable for
non-graphql stuff, such as submitting login information.
  • Loading branch information
rasben committed Jan 2, 2025
1 parent 93ac68e commit 850df4b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ x-environment:
WEBROOT: web
GRAPHQL_USER_NAME: graphql_consumer
GRAPHQL_USER_PASSWORD: test
BNF_SERVER_GRAPHQL_ENDPOINT: "https://dpl-cms.local/graphql"
BNF_SERVER_BASE_ENDPOINT: "https://dpl-cms.local"
# Uncomment if you like to have the system behave like in production
#LAGOON_ENVIRONMENT_TYPE: production

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function buildForm(array $form, FormStateInterface $form_state): array {
$form['#title'] = $this->t('Confirm import of BNF content', [], ['context' => 'BNF']);

$uuid = $this->routeMatch->getParameter('uuid');
$bnfServer = (string) getenv('BNF_SERVER_GRAPHQL_ENDPOINT');
$bnfServer = (string) getenv('BNF_SERVER_BASE_ENDPOINT') . '/graphql';

$form_state->set('uuid', $uuid);
$form_state->set('bnfServer', $bnfServer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function exportNode(NodeInterface $node): void {
GRAPHQL;

try {
$bnfServer = (string) getenv('BNF_SERVER_GRAPHQL_ENDPOINT');
$bnfServer = (string) getenv('BNF_SERVER_BASE_ENDPOINT') . '/graphql';

if (!filter_var($bnfServer, FILTER_VALIDATE_URL)) {
throw new \InvalidArgumentException('The provided BNF server URL is not valid.');
Expand Down

0 comments on commit 850df4b

Please sign in to comment.