Skip to content

Commit

Permalink
Merge pull request #6 from klippa-app/hardcode-api-url
Browse files Browse the repository at this point in the history
Add static API url
  • Loading branch information
elbble authored Apr 4, 2024
2 parents bfd14d3 + 5a4e7b3 commit aab3c0a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ApiCommunicationsWrapper/Services/APIFunctions.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {API_URL} from "../vars";

require("dotenv").config();

import {
Expand All @@ -18,7 +20,7 @@ export namespace APIFunctionalities {
requestProperties: RequestProperties,
): Promise<DocHorizonResponse> {
const { endpoint, params, body } = requestProperties;
let url = `${process.env.API_URL}${endpoint.url}`;
let url = `${process.env.API_URL ?? API_URL}${endpoint.url}`;

if (params?.PathParams) {
url = processPathParameters(url, params.PathParams);
Expand Down
1 change: 1 addition & 0 deletions src/ApiCommunicationsWrapper/vars.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const API_URL = 'https://dochorizon.klippa.com'

0 comments on commit aab3c0a

Please sign in to comment.