From 474506d871af7606e4ae2fd40d500c48f7ad36b6 Mon Sep 17 00:00:00 2001 From: Francesco Persico Date: Sat, 14 Mar 2020 10:25:29 +0100 Subject: [PATCH] [#171800044] Use appsettings instead of connectionstrings --- CreateMessage/index.ts | 4 ++-- CreateNotificationActivity/index.ts | 4 ++-- EmailNotificationActivity/index.ts | 4 ++-- GetLimitedProfile/index.ts | 4 ++-- GetLimitedProfileByPOST/index.ts | 4 ++-- GetMessage/index.ts | 4 ++-- GetSubscriptionsFeed/index.ts | 4 ++-- MessageStatusUpdaterActivity/index.ts | 4 ++-- NotificationStatusUpdaterActivity/index.ts | 4 ++-- README.md | 4 ++-- StoreMessageContentActivity/index.ts | 4 ++-- WebhookNotificationActivity/index.ts | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/CreateMessage/index.ts b/CreateMessage/index.ts index 4f1ba0fe..5628964b 100644 --- a/CreateMessage/index.ts +++ b/CreateMessage/index.ts @@ -41,8 +41,8 @@ secureExpressApp(app); // Set up CORS (free access to the API from browser clients) app.use(cors()); -const cosmosDbUri = getRequiredStringEnv("CUSTOMCONNSTR_COSMOSDB_URI"); -const cosmosDbKey = getRequiredStringEnv("CUSTOMCONNSTR_COSMOSDB_KEY"); +const cosmosDbUri = getRequiredStringEnv("COSMOSDB_URI"); +const cosmosDbKey = getRequiredStringEnv("COSMOSDB_KEY"); const cosmosDbName = getRequiredStringEnv("COSMOSDB_NAME"); const messageContainerName = getRequiredStringEnv("MESSAGE_CONTAINER_NAME"); diff --git a/CreateNotificationActivity/index.ts b/CreateNotificationActivity/index.ts index 91ed2cf2..3a1e08e1 100644 --- a/CreateNotificationActivity/index.ts +++ b/CreateNotificationActivity/index.ts @@ -27,8 +27,8 @@ import { getRequiredStringEnv } from "io-functions-commons/dist/src/utils/env"; import { getCreateNotificationActivityHandler } from "./handler"; // Setup DocumentDB -const cosmosDbUri = getRequiredStringEnv("CUSTOMCONNSTR_COSMOSDB_URI"); -const cosmosDbKey = getRequiredStringEnv("CUSTOMCONNSTR_COSMOSDB_KEY"); +const cosmosDbUri = getRequiredStringEnv("COSMOSDB_URI"); +const cosmosDbKey = getRequiredStringEnv("COSMOSDB_KEY"); const cosmosDbName = getRequiredStringEnv("COSMOSDB_NAME"); const documentDbDatabaseUrl = documentDbUtils.getDatabaseUri(cosmosDbName); diff --git a/EmailNotificationActivity/index.ts b/EmailNotificationActivity/index.ts index 5958ea84..afe64def 100644 --- a/EmailNotificationActivity/index.ts +++ b/EmailNotificationActivity/index.ts @@ -26,8 +26,8 @@ import { MailUpTransport } from "io-functions-commons/dist/src/utils/mailup"; import { getEmailNotificationActivityHandler } from "./handler"; // Setup DocumentDB -const cosmosDbUri = getRequiredStringEnv("CUSTOMCONNSTR_COSMOSDB_URI"); -const cosmosDbKey = getRequiredStringEnv("CUSTOMCONNSTR_COSMOSDB_KEY"); +const cosmosDbUri = getRequiredStringEnv("COSMOSDB_URI"); +const cosmosDbKey = getRequiredStringEnv("COSMOSDB_KEY"); const cosmosDbName = getRequiredStringEnv("COSMOSDB_NAME"); const documentDbDatabaseUrl = documentDbUtils.getDatabaseUri(cosmosDbName); diff --git a/GetLimitedProfile/index.ts b/GetLimitedProfile/index.ts index f93be210..a93892b0 100644 --- a/GetLimitedProfile/index.ts +++ b/GetLimitedProfile/index.ts @@ -27,8 +27,8 @@ secureExpressApp(app); // Set up CORS (free access to the API from browser clients) app.use(cors()); -const cosmosDbUri = getRequiredStringEnv("CUSTOMCONNSTR_COSMOSDB_URI"); -const cosmosDbKey = getRequiredStringEnv("CUSTOMCONNSTR_COSMOSDB_KEY"); +const cosmosDbUri = getRequiredStringEnv("COSMOSDB_URI"); +const cosmosDbKey = getRequiredStringEnv("COSMOSDB_KEY"); const cosmosDbName = getRequiredStringEnv("COSMOSDB_NAME"); const documentClient = new DocumentDBClient(cosmosDbUri, { diff --git a/GetLimitedProfileByPOST/index.ts b/GetLimitedProfileByPOST/index.ts index 4885962a..802037ad 100644 --- a/GetLimitedProfileByPOST/index.ts +++ b/GetLimitedProfileByPOST/index.ts @@ -20,8 +20,8 @@ import winston = require("winston"); import { GetLimitedProfileByPOST } from "./handler"; -const cosmosDbUri = getRequiredStringEnv("CUSTOMCONNSTR_COSMOSDB_URI"); -const cosmosDbKey = getRequiredStringEnv("CUSTOMCONNSTR_COSMOSDB_KEY"); +const cosmosDbUri = getRequiredStringEnv("COSMOSDB_URI"); +const cosmosDbKey = getRequiredStringEnv("COSMOSDB_KEY"); const cosmosDbName = getRequiredStringEnv("COSMOSDB_NAME"); const documentClient = new DocumentDBClient(cosmosDbUri, { diff --git a/GetMessage/index.ts b/GetMessage/index.ts index e89a23c2..708e14ae 100644 --- a/GetMessage/index.ts +++ b/GetMessage/index.ts @@ -45,8 +45,8 @@ secureExpressApp(app); // Set up CORS (free access to the API from browser clients) app.use(cors()); -const cosmosDbUri = getRequiredStringEnv("CUSTOMCONNSTR_COSMOSDB_URI"); -const cosmosDbKey = getRequiredStringEnv("CUSTOMCONNSTR_COSMOSDB_KEY"); +const cosmosDbUri = getRequiredStringEnv("COSMOSDB_URI"); +const cosmosDbKey = getRequiredStringEnv("COSMOSDB_KEY"); const cosmosDbName = getRequiredStringEnv("COSMOSDB_NAME"); const messageContainerName = getRequiredStringEnv("MESSAGE_CONTAINER_NAME"); diff --git a/GetSubscriptionsFeed/index.ts b/GetSubscriptionsFeed/index.ts index cff0f50e..f17e37b4 100644 --- a/GetSubscriptionsFeed/index.ts +++ b/GetSubscriptionsFeed/index.ts @@ -28,8 +28,8 @@ secureExpressApp(app); // Set up CORS (free access to the API from browser clients) app.use(cors()); -const cosmosDbUri = getRequiredStringEnv("CUSTOMCONNSTR_COSMOSDB_URI"); -const cosmosDbKey = getRequiredStringEnv("CUSTOMCONNSTR_COSMOSDB_KEY"); +const cosmosDbUri = getRequiredStringEnv("COSMOSDB_URI"); +const cosmosDbKey = getRequiredStringEnv("COSMOSDB_KEY"); const cosmosDbName = getRequiredStringEnv("COSMOSDB_NAME"); const documentDbDatabaseUrl = documentDbUtils.getDatabaseUri(cosmosDbName); diff --git a/MessageStatusUpdaterActivity/index.ts b/MessageStatusUpdaterActivity/index.ts index a83cb1e0..4a0858e4 100644 --- a/MessageStatusUpdaterActivity/index.ts +++ b/MessageStatusUpdaterActivity/index.ts @@ -10,8 +10,8 @@ import { getRequiredStringEnv } from "io-functions-commons/dist/src/utils/env"; import { getMessageStatusUpdaterActivityHandler } from "./handler"; -const cosmosDbUri = getRequiredStringEnv("CUSTOMCONNSTR_COSMOSDB_URI"); -const cosmosDbKey = getRequiredStringEnv("CUSTOMCONNSTR_COSMOSDB_KEY"); +const cosmosDbUri = getRequiredStringEnv("COSMOSDB_URI"); +const cosmosDbKey = getRequiredStringEnv("COSMOSDB_KEY"); const cosmosDbName = getRequiredStringEnv("COSMOSDB_NAME"); const documentDbDatabaseUrl = documentDbUtils.getDatabaseUri(cosmosDbName); diff --git a/NotificationStatusUpdaterActivity/index.ts b/NotificationStatusUpdaterActivity/index.ts index e73bade3..b6a5b9c2 100644 --- a/NotificationStatusUpdaterActivity/index.ts +++ b/NotificationStatusUpdaterActivity/index.ts @@ -25,8 +25,8 @@ import { getNotificationStatusUpdaterActivityHandler } from "./handler"; // Setup DocumentDB -const cosmosDbUri = getRequiredStringEnv("CUSTOMCONNSTR_COSMOSDB_URI"); -const cosmosDbKey = getRequiredStringEnv("CUSTOMCONNSTR_COSMOSDB_KEY"); +const cosmosDbUri = getRequiredStringEnv("COSMOSDB_URI"); +const cosmosDbKey = getRequiredStringEnv("COSMOSDB_KEY"); const cosmosDbName = getRequiredStringEnv("COSMOSDB_NAME"); const documentDbDatabaseUrl = documentDbUtils.getDatabaseUri(cosmosDbName); diff --git a/README.md b/README.md index 413fe162..6b9a968e 100644 --- a/README.md +++ b/README.md @@ -44,8 +44,8 @@ following contents: "APPINSIGHTS_INSTRUMENTATIONKEY": "", "MESSAGE_CONTAINER_NAME": "message-content", "COSMOSDB_NAME": "", - "CUSTOMCONNSTR_COSMOSDB_KEY": "", - "CUSTOMCONNSTR_COSMOSDB_URI": "", + "COSMOSDB_KEY": "", + "COSMOSDB_URI": "", "WEBHOOK_CHANNEL_URL": "", "MAILUP_USERNAME": "", "MAILUP_SECRET": "", diff --git a/StoreMessageContentActivity/index.ts b/StoreMessageContentActivity/index.ts index 73652fef..f0ef4541 100644 --- a/StoreMessageContentActivity/index.ts +++ b/StoreMessageContentActivity/index.ts @@ -15,8 +15,8 @@ import { getRequiredStringEnv } from "io-functions-commons/dist/src/utils/env"; import { getStoreMessageContentActivityHandler } from "./handler"; // Setup DocumentDB -const cosmosDbUri = getRequiredStringEnv("CUSTOMCONNSTR_COSMOSDB_URI"); -const cosmosDbKey = getRequiredStringEnv("CUSTOMCONNSTR_COSMOSDB_KEY"); +const cosmosDbUri = getRequiredStringEnv("COSMOSDB_URI"); +const cosmosDbKey = getRequiredStringEnv("COSMOSDB_KEY"); const cosmosDbName = getRequiredStringEnv("COSMOSDB_NAME"); const documentDbDatabaseUrl = documentDbUtils.getDatabaseUri(cosmosDbName); diff --git a/WebhookNotificationActivity/index.ts b/WebhookNotificationActivity/index.ts index a07f845b..42e6b012 100644 --- a/WebhookNotificationActivity/index.ts +++ b/WebhookNotificationActivity/index.ts @@ -19,8 +19,8 @@ import { getRequiredStringEnv } from "io-functions-commons/dist/src/utils/env"; import { getWebhookNotificationActivityHandler } from "./handler"; // Setup DocumentDB -const cosmosDbUri = getRequiredStringEnv("CUSTOMCONNSTR_COSMOSDB_URI"); -const cosmosDbKey = getRequiredStringEnv("CUSTOMCONNSTR_COSMOSDB_KEY"); +const cosmosDbUri = getRequiredStringEnv("COSMOSDB_URI"); +const cosmosDbKey = getRequiredStringEnv("COSMOSDB_KEY"); const cosmosDbName = getRequiredStringEnv("COSMOSDB_NAME"); const documentDbDatabaseUrl = documentDbUtils.getDatabaseUri(cosmosDbName);