From 14affc846dd9ba5341393790adadc391102a7b2c Mon Sep 17 00:00:00 2001 From: Amadeus <38767929+Mozart409@users.noreply.github.com> Date: Fri, 12 May 2023 09:59:35 +0200 Subject: [PATCH] fix: :adhesive_bandage: fix issue #35 --- src/utils/api.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/api.ts b/src/utils/api.ts index 661cd77..d8b8b2b 100644 --- a/src/utils/api.ts +++ b/src/utils/api.ts @@ -6,11 +6,11 @@ const getFullUrl = (url: string) => { let baseUrl: string = '' if (process.env.NODE_ENV === 'production') { - let API_URL = process.env.API_URL + let API_URL = import.meta.env.API_URL if (API_URL === undefined) { throw new Error('API_URL is undefined. Please set it in .env file.') } - baseUrl = process.env.API_URL + '/api' + baseUrl = import.meta.env.API_URL + '/api' } else { baseUrl = 'http://localhost:4000/api' }