Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLAG-1095] Split RW and GFW API's keys to make it more flexible #4888

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pages/api/metadata/[...params].js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { GFW_METADATA_API, GFW_STAGING_METADATA_API } from 'utils/apis';
import axios from 'axios';

const ENVIRONMENT = process.env.NEXT_PUBLIC_FEATURE_ENV;
const ENVIRONMENT = process.env.NEXT_PUBLIC_RW_FEATURE_ENV;
const GFW_METADATA_API_URL =
ENVIRONMENT === 'staging' ? GFW_STAGING_METADATA_API : GFW_METADATA_API;

Expand Down
2 changes: 1 addition & 1 deletion providers/datasets-provider/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const setDatasets = createAction('setDatasets');
export const setDatasetsWithMetadata = createAction('setDatasetsWithMetadata');

const handleFeatureEnvLock = (env) => {
const currEnv = process.env.NEXT_PUBLIC_FEATURE_ENV;
const currEnv = process.env.NEXT_PUBLIC_RW_FEATURE_ENV;
const MIXED_ENV = 'preproduction-staging';
if (env === MIXED_ENV && currEnv !== 'production') {
return true;
Expand Down
2 changes: 1 addition & 1 deletion services/datasets.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { rwRequest, dataRequest } from 'utils/request';

const environmentString = () => {
const env = process.env.NEXT_PUBLIC_FEATURE_ENV;
const env = process.env.NEXT_PUBLIC_RW_FEATURE_ENV;
let envString = 'production';
if (env === 'preproduction') {
envString += ',preproduction';
Expand Down
4 changes: 3 additions & 1 deletion services/shape.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import request from 'utils/request';
import { GFW_API, GFW_STAGING_API } from 'utils/apis';

const GFW_API_URL =
process.env.NEXT_PUBLIC_FEATURE_ENV === 'staging' ? GFW_STAGING_API : GFW_API;
process.env.NEXT_PUBLIC_RW_FEATURE_ENV === 'staging'
? GFW_STAGING_API
: GFW_API;

const QUERIES = {
ogrConvert: '/v2/ogr/convert',
Expand Down
Loading