From c2fbe77447a6227714576711a0a1c5ab5c7075bf Mon Sep 17 00:00:00 2001 From: Clemens Wolff Date: Tue, 25 Jun 2019 12:22:55 -0400 Subject: [PATCH] Move rootUrl constant to http utils --- app/server/static/components/http.js | 1 + app/server/static/components/projects.vue | 13 ++++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/server/static/components/http.js b/app/server/static/components/http.js index df1fa1d3..00709488 100644 --- a/app/server/static/components/http.js +++ b/app/server/static/components/http.js @@ -7,5 +7,6 @@ const HTTP = axios.create({ baseURL: `/v1/${baseUrl}`, }); +export const rootUrl = window.location.href.split('/').slice(0, 3).join('/'); export const newHttpClient = axios.create; export default HTTP; diff --git a/app/server/static/components/projects.vue b/app/server/static/components/projects.vue index d17198f9..c3ffd51e 100644 --- a/app/server/static/components/projects.vue +++ b/app/server/static/components/projects.vue @@ -120,9 +120,8 @@