From c51edddb5328985d35997c524242aecd1e4286b9 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Thu, 6 Jun 2024 12:26:42 +0530 Subject: [PATCH] Clarify --- web/apps/payments/README.md | 2 +- web/apps/photos/.env | 12 ++++++------ web/apps/photos/.env.development | 4 ++-- web/packages/shared/network/api.ts | 9 ++++----- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/web/apps/payments/README.md b/web/apps/payments/README.md index ebf3a63901..4b0f99402a 100644 --- a/web/apps/payments/README.md +++ b/web/apps/payments/README.md @@ -20,7 +20,7 @@ Add the following to `web/apps/photos/.env.local`: ```env NEXT_PUBLIC_ENTE_ENDPOINT = http://localhost:8080 -NEXT_PUBLIC_ENTE_PAYMENTS_ENDPOINT = http://localhost:3001 +NEXT_PUBLIC_ENTE_PAYMENTS_URL = http://localhost:3001 ``` Then start it locally diff --git a/web/apps/photos/.env b/web/apps/photos/.env index 978c677769..766c3b861e 100644 --- a/web/apps/photos/.env +++ b/web/apps/photos/.env @@ -41,13 +41,13 @@ # # NEXT_PUBLIC_ENTE_ENDPOINT = http://localhost:3000 -# The Ente API endpoint for accounts related functionality +# The URL of the accounts app # -# NEXT_PUBLIC_ENTE_ACCOUNTS_ENDPOINT = http://localhost:3001 +# NEXT_PUBLIC_ENTE_ACCOUNTS_URL = http://localhost:3001 -# The Ente API endpoint for payments related functionality +# The URL of the payments app # -# NEXT_PUBLIC_ENTE_PAYMENTS_ENDPOINT = http://localhost:3001 +# NEXT_PUBLIC_ENTE_PAYMENTS_URL = http://localhost:3001 # The URL for the shared albums deployment # @@ -69,7 +69,7 @@ # # NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT = http://localhost:3002 -# The URL of the family plans web app deployment +# The URL of the family plans web app # # Currently the source code for the family plan related pages is in a separate # repository (https://github.com/ente-io/families). The mobile app also uses @@ -77,7 +77,7 @@ # # Enhancement: Consider moving that into the app/ folder in this repository. # -# NEXT_PUBLIC_ENTE_FAMILY_ENDPOINT = http://localhost:3001 +# NEXT_PUBLIC_ENTE_FAMILY_URL = http://localhost:3001 # The JSON which describes the expected results of our integration tests. See # `upload.test.ts` for more details of the expected format. diff --git a/web/apps/photos/.env.development b/web/apps/photos/.env.development index fe83001208..1da6070f45 100644 --- a/web/apps/photos/.env.development +++ b/web/apps/photos/.env.development @@ -27,5 +27,5 @@ # in the app you're running (e.g. in apps/accounts), and put an # `NEXT_PUBLIC_ENTE_ENDPOINT` in there. -#NEXT_PUBLIC_ENTE_ACCOUNTS_ENDPOINT = http://localhost:3001 -#NEXT_PUBLIC_ENTE_PAYMENTS_ENDPOINT = http://localhost:3001 +#NEXT_PUBLIC_ENTE_ACCOUNTS_URL = http://localhost:3001 +#NEXT_PUBLIC_ENTE_PAYMENTS_URL = http://localhost:3001 diff --git a/web/packages/shared/network/api.ts b/web/packages/shared/network/api.ts index 437f4a45f0..6ce97a786d 100644 --- a/web/packages/shared/network/api.ts +++ b/web/packages/shared/network/api.ts @@ -38,12 +38,11 @@ export const getUploadEndpoint = () => { * Return the URL of the Ente Accounts app. * * Defaults to our production instance, "https://accounts.ente.io", but can be - * overridden by setting the `NEXT_PUBLIC_ENTE_ACCOUNTS_ENDPOINT` environment + * overridden by setting the `NEXT_PUBLIC_ENTE_ACCOUNTS_URL` environment * variable to a non-empty value. */ export const accountsAppURL = () => - process.env.NEXT_PUBLIC_ENTE_ACCOUNTS_ENDPOINT || - `https://accounts.ente.io`; + process.env.NEXT_PUBLIC_ENTE_ACCOUNTS_URL || `https://accounts.ente.io`; export const getAlbumsURL = () => { const albumsURL = process.env.NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT; @@ -58,7 +57,7 @@ export const getAlbumsURL = () => { * family plans. */ export const getFamilyPortalURL = () => { - const familyURL = process.env.NEXT_PUBLIC_ENTE_FAMILY_ENDPOINT; + const familyURL = process.env.NEXT_PUBLIC_ENTE_FAMILY_URL; if (familyURL) { return familyURL; } @@ -69,7 +68,7 @@ export const getFamilyPortalURL = () => { * Return the URL for the host that handles payment related functionality. */ export const getPaymentsURL = () => { - const paymentsURL = process.env.NEXT_PUBLIC_ENTE_PAYMENTS_ENDPOINT; + const paymentsURL = process.env.NEXT_PUBLIC_ENTE_PAYMENTS_URL; if (paymentsURL) { return paymentsURL; }