Skip to content

Commit

Permalink
feat: add environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikssonJoakim committed Oct 31, 2022
1 parent a646cb8 commit 44d097b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ OKP4_LICENCE_BLOCKCHAIN_URL='https://www.apache.org/licenses/LICENSE-2.0'
OKP4_LICENCE_CODE_URL='https://opensource.org/licenses/BSD-3-Clause'
OKP4_LICENCE_ASSETS_URL='https://creativecommons.org/licenses/by-sa/4.0'
OKP4_ARBITRAGE_URL='https://www.arbitrage.org'
OKP4_ARBITRAGE_RULES_URL='https://www.arbitrage.org/arbitrage/#REGLEMENT_ARBITRAGE'
OKP4_ARBITRAGE_RULES_URL='https://www.arbitrage.org/arbitrage/#REGLEMENT_ARBITRAGE'
OKP4_COOKIE_POLICY_URL='https://okp4.network/cookie-policy'
1 change: 1 addition & 0 deletions environment.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ declare namespace NodeJS {
OKP4_LICENCE_ASSETS_URL: string
OKP4_ARBITRAGE_URL: string
OKP4_ARBITRAGE_RULES_URL: string
OKP4_COOKIE_POLICY_URL: string
}
}

Expand Down
3 changes: 3 additions & 0 deletions src/pages/api/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ export default function handler(_req: NextApiRequest, res: NextApiResponse<Confi
termsUrls: {
arbitrageUrl: process.env.OKP4_ARBITRAGE_URL,
arbitrageRulesUrl: process.env.OKP4_ARBITRAGE_RULES_URL
},
privacyUrls: {
cookiePolicyUrl: process.env.OKP4_COOKIE_POLICY_URL
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/types/config.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,8 @@ export type Config = {
arbitrageUrl: string
arbitrageRulesUrl: string
}
privacyUrls: {
cookiePolicyUrl: string
}
}
}

0 comments on commit 44d097b

Please sign in to comment.