@@ -4,7 +4,7 @@ import { CollectiveType } from './constants/collectives';
44import { TransactionTypes } from './constants/transactions' ;
55import { getWebsiteUrl } from './utils' ;
66
7- export const invoiceServiceURL = process . env . PDF_SERVICE_URL ;
7+ export const PDF_SERVICE_URL = process . env . PDF_SERVICE_URL ;
88
99// ---- Utils ----
1010
@@ -37,15 +37,15 @@ export const objectToQueryString = options => {
3737// ---- Routes to other Open Collective services ----
3838
3939export const collectiveInvoiceURL = ( collectiveSlug , hostSlug , startDate , endDate , format ) => {
40- return `${ invoiceServiceURL } /receipts/collectives/${ collectiveSlug } /${ hostSlug } /${ startDate } /${ endDate } /receipt.${ format } ` ;
40+ return `${ PDF_SERVICE_URL } /receipts/collectives/${ collectiveSlug } /${ hostSlug } /${ startDate } /${ endDate } /receipt.${ format } ` ;
4141} ;
4242
4343export const transactionInvoiceURL = transactionUUID => {
44- return `${ invoiceServiceURL } /receipts/transactions/${ transactionUUID } /receipt.pdf` ;
44+ return `${ PDF_SERVICE_URL } /receipts/transactions/${ transactionUUID } /receipt.pdf` ;
4545} ;
4646
4747export const expenseInvoiceUrl = expenseId => {
48- return `${ invoiceServiceURL } /expense/${ expenseId } /invoice.pdf` ;
48+ return `${ PDF_SERVICE_URL } /expense/${ expenseId } /invoice.pdf` ;
4949} ;
5050
5151/**
@@ -54,7 +54,7 @@ export const expenseInvoiceUrl = expenseId => {
5454 * @param {string } filename - filename **with** extension
5555 */
5656export const giftCardsDownloadUrl = filename => {
57- return `${ invoiceServiceURL } /giftcards/from-data/${ filename } ` ;
57+ return `${ PDF_SERVICE_URL } /giftcards/from-data/${ filename } ` ;
5858} ;
5959
6060// ---- Routes to external services ----
0 commit comments