Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
drizzentic and coderabbitai[bot] authored Jul 31, 2024
1 parent 449b9c1 commit 04b4e38
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 3 additions & 1 deletion fhir-ig-importer/importer/volume/openhimConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@ const appJsonData = JSON.parse(
//Substitute the url with environ variable

let url = appJsonData.url;
if (!process.env.OPENHIM_CONSOLE_BASE_URL) {
throw new Error("Environment variable OPENHIM_CONSOLE_BASE_URL is not set");
}
let newUrl = url.replace(
"<openhim-console-url>",
process.env.OPENHIM_CONSOLE_BASE_URL
);

appJsonData.url = newUrl;

const data = JSON.stringify(jsonData);
const appData = JSON.stringify(appJsonData);

Expand Down
6 changes: 5 additions & 1 deletion kafka-mapper-consumer/openhimConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,17 @@ const appJsonData = JSON.parse(
//Substitute the url with environ variable

let url = appJsonData.url;

if (!process.env.OPENHIM_CONSOLE_BASE_URL) {
throw new Error("Environment variable OPENHIM_CONSOLE_BASE_URL is not set");
}

let newUrl = url.replace(
"<openhim-console-url>",
process.env.OPENHIM_CONSOLE_BASE_URL
);

appJsonData.url = newUrl;

const appData = JSON.stringify(appJsonData);

const options = {
Expand Down
4 changes: 4 additions & 0 deletions reprocess-mediator/openhimConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ const appJsonData = JSON.parse(
//Substitute the url with environ variable

let url = appJsonData.url;

if (!process.env.OPENHIM_CONSOLE_BASE_URL) {
throw new Error("Environment variable OPENHIM_CONSOLE_BASE_URL is not set");
}
let newUrl = url.replace(
"<openhim-console-url>",
process.env.OPENHIM_CONSOLE_BASE_URL
Expand Down

0 comments on commit 04b4e38

Please sign in to comment.