From 747c1d2a906ed46325b999ebc0f079265ad81eeb Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Wed, 3 Mar 2021 18:20:53 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20basic=20env.js=20file=20for=20api?= =?UTF-8?q?=20baseurl,=20documentserver=5Fkey?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ref #3 --- .gitignore | 3 ++- index.html | 1 + public/env.sample.js | 6 ++++++ src/components/Register.vue | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 public/env.sample.js diff --git a/.gitignore b/.gitignore index dc24894..979299d 100644 --- a/.gitignore +++ b/.gitignore @@ -182,4 +182,5 @@ docs/_book test/ /package-lock.json -/yarn.lock \ No newline at end of file +/yarn.lock +/public/env.js \ No newline at end of file diff --git a/index.html b/index.html index 8a98ae3..2e151b8 100644 --- a/index.html +++ b/index.html @@ -10,6 +10,7 @@
+ diff --git a/public/env.sample.js b/public/env.sample.js new file mode 100644 index 0000000..fc95691 --- /dev/null +++ b/public/env.sample.js @@ -0,0 +1,6 @@ +const config = { + documentserver_key: '', + baseurl: '', + url_imprint: '', + url_privacy: '' +}; diff --git a/src/components/Register.vue b/src/components/Register.vue index 9622b5a..a8a6673 100644 --- a/src/components/Register.vue +++ b/src/components/Register.vue @@ -254,7 +254,7 @@ function login() { } } toast("registration in progress..."); - axios.post('https://dev.lauf-fuer-kaya.de/api/runners/register', postdata) + axios.post(`${config.baseurl}api/runners/register`, postdata) .then((response) => { response = response.data; const token = response.token;