diff --git a/src/environments/endpoints.ts b/src/environments/endpoints.ts index bf388a1f..14b61661 100644 --- a/src/environments/endpoints.ts +++ b/src/environments/endpoints.ts @@ -1,9 +1,9 @@ -const backendApiUrlsInDev = { +export const backendApiUrlsInDev = { local: 'http://tktest.lan/api/v1', remote: 'http://tktest.lan/api/v1', // remote: 'https://framadate-api.cipherbliss.com/api/v1', }; -const apiV1 = { +export const apiV1 = { baseHref: 'http://tktest.lan/api/v1', // baseHref: 'https://framadate-api.cipherbliss.com/api/v1', api_new_poll: '/poll/', diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 55345545..494cce00 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -1,27 +1,23 @@ import { endpoints } from './endpoints'; import { poll_conf } from './poll_conf'; +const prodBaseHref = 'https://framadate-api.cipherbliss.com'; const backendApiUrlsInDev = { local: '/api/v1', - remote: 'https://framadate-api.cipherbliss.com/api/v1', -}; -const apiV1 = { - baseHref: 'https://framadate-api.cipherbliss.com/api/v1', - api_new_poll: '/poll/', - api_get_poll: '/poll/{id}', - 'api_test-mail-poll': '/api/v1/poll/mail/test-mail-poll/{emailChoice}', - 'app.swagger': '/api/doc.json', + remote: `${prodBaseHref}/api/v1`, }; +endpoints.baseHref = `${prodBaseHref}/api/v1`; + export const environment = { - frontDomain: 'https://framadate-api.cipherbliss.com', + frontDomain: prodBaseHref, production: true, display_routes: true, showDemoWarning: true, autofill: true, autoSendNewPoll: false, interval_days_default: 7, - appTitle: 'FramaDate Funky', + appTitle: 'FramaDate Funky Démo', appVersion: '0.6.0', appLogo: 'assets/img/logo.png', api: endpoints, diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 38f9f847..eba3bb59 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -2,9 +2,11 @@ // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. // The list of file replacements can be found in `angular.json`. -import { endpoints } from './endpoints'; +import { apiV1, endpoints } from './endpoints'; import { poll_conf } from './poll_conf'; +endpoints.baseHref = apiV1.baseHref; + export const environment = { frontDomain: 'http://127.0.0.1:4200', production: false, @@ -13,7 +15,7 @@ export const environment = { showDemoWarning: false, autoSendNewPoll: false, interval_days_default: 7, - appTitle: 'FDFunky', + appTitle: 'funky', appVersion: '0.6.0', appLogo: 'assets/img/logo.png', api: endpoints,