Skip to content

Commit

Permalink
HARMONY-1876: Use env var for the root URL to use to submit a harmony…
Browse files Browse the repository at this point in the history
… request. Move required dependencies out of dev dependencies.
  • Loading branch information
chris-durbin committed Jan 7, 2025
1 parent c09ba7d commit 5636c1f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 424 deletions.
4 changes: 3 additions & 1 deletion services/harmony/app/frontends/free-text-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ async function submitHarmonyRequest(collection, variable, queryParams, geoJson:
queryParams.maxResults = 1;
queryParams.simplifyShapefile = true;
const encodedVariable = encodeURIComponent(variable);
const baseUrl = `http://localhost:3000/${collection}/ogc-api-coverages/1.0.0/collections/${encodedVariable}/coverage/rangeset`;
// const baseUrl = `http://localhost:3000/${collection}/ogc-api-coverages/1.0.0/collections/${encodedVariable}/coverage/rangeset`;
const root = process.env.OAUTH_REDIRECT_URI.replace('/oauth2/redirect', '');
const baseUrl = `${root}/${collection}/ogc-api-coverages/1.0.0/collections/${encodedVariable}/coverage/rangeset`;
const querystr = querystring.stringify(queryParams);
const headers = {
..._makeTokenHeader(token),
Expand Down
Loading

0 comments on commit 5636c1f

Please sign in to comment.