aboutsummaryrefslogtreecommitdiff
path: root/src/client/cognitive_services/CognitiveServices.ts
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2020-04-13 00:03:13 -0700
committerSam Wilkins <samwilkins333@gmail.com>2020-04-13 00:03:13 -0700
commite3a5dc3ce59b1d8f2dde63395505061b304d64c0 (patch)
tree4c67467a701a305d8af41e559b63275aa9b3e77c /src/client/cognitive_services/CognitiveServices.ts
parentcfe2272c7f9a63edd449b460b31f0c45a77a07ca (diff)
completed migration to webpack-transferred environment variables, rather than a server route
Diffstat (limited to 'src/client/cognitive_services/CognitiveServices.ts')
-rw-r--r--src/client/cognitive_services/CognitiveServices.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/cognitive_services/CognitiveServices.ts b/src/client/cognitive_services/CognitiveServices.ts
index 3133bf4b1..8c63ae906 100644
--- a/src/client/cognitive_services/CognitiveServices.ts
+++ b/src/client/cognitive_services/CognitiveServices.ts
@@ -45,7 +45,7 @@ export enum Confidence {
export namespace CognitiveServices {
const ExecuteQuery = async <D>(service: Service, manager: APIManager<D>, data: D): Promise<any> => {
- const apiKey = await Utils.getApiKey(service);
+ const apiKey = process.env[service.toUpperCase()];
if (!apiKey) {
console.log(`No API key found for ${service}: ensure index.ts has access to a .env file in your root directory.`);
return undefined;