From e3fc7f270f6d2449f63cd746e5c8474eafcc63ac Mon Sep 17 00:00:00 2001 From: Tykayn Date: Thu, 20 May 2021 15:08:06 +0200 Subject: [PATCH] back prod env --- src/environments/environment.prod.ts | 71 ++++++++++++++++++++++------ 1 file changed, 56 insertions(+), 15 deletions(-) diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 494cce00..c6cb3ba5 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -1,28 +1,69 @@ -import { endpoints } from './endpoints'; -import { poll_conf } from './poll_conf'; - -const prodBaseHref = 'https://framadate-api.cipherbliss.com'; const backendApiUrlsInDev = { local: '/api/v1', - remote: `${prodBaseHref}/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', }; -endpoints.baseHref = `${prodBaseHref}/api/v1`; - export const environment = { - frontDomain: prodBaseHref, + frontDomain: 'https://framadate-api.cipherbliss.com', production: true, display_routes: true, showDemoWarning: true, - autofill: true, + autofill: false, autoSendNewPoll: false, - interval_days_default: 7, - appTitle: 'FramaDate Funky Démo', - appVersion: '0.6.0', + appTitle: 'FramaDate Funky', + appVersion: '2.1.0', appLogo: 'assets/img/logo.png', - api: endpoints, - poll: poll_conf, + api: { + versionToUse: 'apiV1', + version: { + apiV1, + }, + baseHref: backendApiUrlsInDev.remote, + endpoints: { + polls: { + name: '/poll', + choices: { + name: '/choices', + }, + comments: { + name: '/comments', + }, + slugs: { + name: '/slugs', + }, + answers: { + name: '/answers', + }, + }, + users: { + name: '/users', + polls: { + name: '/polls', + sendEmail: { + name: '/send-email', + }, + }, + }, + }, + }, + poll: { + defaultConfig: { + maxCountOfAnswers: 150, + expiresDaysDelay: 60, + expiracyAfterLastModificationInDays: 180, + whoCanChangeAnswers: 'everybody', + visibility: 'link_only', + voteChoices: 'only_yes', + }, + }, localStorage: { - key: 'FramaDateFunky', + key: 'FramaSondage', }, };