From 94654f13901d3fb15cb7bf550e94a759257ab22d Mon Sep 17 00:00:00 2001 From: dadiorchen Date: Wed, 22 Nov 2023 09:45:41 +0800 Subject: [PATCH] fix: capture page --- .env.development | 1 + src/models/apiPaths.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.env.development b/.env.development index c15ebfee..fb0271c3 100644 --- a/.env.development +++ b/.env.development @@ -1,5 +1,6 @@ NEXT_PUBLIC_API=https://dev-k8s.treetracker.org/query/v2 NEXT_PUBLIC_API_V2=https://dev-k8s.treetracker.org/query +NEXT_PUBLIC_STAKEHOLDER_API=https://dev-k8s.treetracker.org/stakeholder NEXT_PUBLIC_TILE_SERVER_URL=https://{s}.treetracker.org/tiles/ NEXT_PUBLIC_TILE_SERVER_SUBDOMAINS=dev-k8s NEXT_PUBLIC_TILE_SERVER_WEBMAP_API=https://dev-k8s.treetracker.org/webmap/ diff --git a/src/models/apiPaths.js b/src/models/apiPaths.js index b57893a1..6232e34a 100644 --- a/src/models/apiPaths.js +++ b/src/models/apiPaths.js @@ -2,6 +2,7 @@ import { urlJoin } from 'url-join-ts'; const host = process.env.NEXT_PUBLIC_API || ''; const hostV2 = process.env.NEXT_PUBLIC_API_V2 || ''; +const hostStakeholder = process.env.NEXT_PUBLIC_STAKEHOLDER_API || ''; const apiPaths = { featuredTrees: urlJoin(host, 'trees/featured'), featuredGrowers: urlJoin(host, 'growers/featured'), @@ -15,7 +16,7 @@ const apiPaths = { captures: (id = '') => urlJoin(host, `captures/${id}`), growers: (id = '') => urlJoin(host, `growers/${id}`), planters: (id = '') => urlJoin(host, `planters/${id}`), - stakeHolders: (id = '') => urlJoin(hostV2, `/stakeholder/stakeholders/${id}`), + stakeHolders: (id = '') => urlJoin(hostStakeholder, `/stakeholders/${id}`), species: urlJoin(host, '/species'), organization: (id = '') => urlJoin(host, `/organizations/${id}`), wallets: (id = '') => urlJoin(host, `/wallets/${id}`),