Skip to content

Commit 0b7581b

Browse files
authored
Merge pull request #1803 from boazsender/automated-transcriptions
add functions api base env var
2 parents 95fdfb4 + 8d080c9 commit 0b7581b

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

functions/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
TYPESENSE_API_URL=https://o89yhjf824.execute-api.us-east-1.amazonaws.com/search
2+
FUNCTIONS_API_BASE=https://us-central1-digital-testimony-dev.cloudfunctions.net

functions/.env.digital-testimony-prod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
TYPESENSE_API_URL=https://yyd73lsw3h.execute-api.us-east-1.amazonaws.com/search
1+
TYPESENSE_API_URL=https://yyd73lsw3h.execute-api.us-east-1.amazonaws.com/search
2+
FUNCTIONS_API_BASE=https://us-central1-digital-testimony-prod.cloudfunctions.net

functions/src/events/scrapeEvents.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,11 @@ const submitTranscription = async ({
154154
// test with: "https://assemblyaiusercontent.com/playground/aKUqpEtmYmI.flac",
155155
maybeVideoUrl,
156156
webhook_url:
157-
// test with: "https://ngrokid.ngrok-free.app/demo-dtp/us-central1/transcription",
158-
process.env.NODE_ENV === "development"
159-
? "https://us-central1-digital-testimony-dev.cloudfunctions.net/transcription"
160-
: "https://us-central1-digital-testimony-prod.cloudfunctions.net/transcription",
157+
// make sure process.env.FUNCTIONS_API_BASE equals
158+
// https://us-central1-digital-testimony-prod.cloudfunctions.net
159+
// on prod. test with:
160+
// "https://ngrokid.ngrok-free.app/demo-dtp/us-central1/transcription",
161+
`${process.env.FUNCTIONS_API_BASE}/transcription`,
161162
speaker_labels: true,
162163
webhook_auth_header_name: "x-maple-webhook",
163164
webhook_auth_header_value: newToken

0 commit comments

Comments
 (0)