From daadee919029f7dea5d7061b9b73280948ddddbe Mon Sep 17 00:00:00 2001 From: Dmitry Date: Tue, 15 Jun 2021 16:43:27 +0300 Subject: [PATCH] fix NODE_ENV + set url --- src/config.js | 2 +- src/store/modules/infobases.js | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/config.js b/src/config.js index 920f341..c5cbc28 100644 --- a/src/config.js +++ b/src/config.js @@ -1,6 +1,6 @@ let config; -if ("production" == process.env.NODE_EN) { +if ("production" == process.env.NODE_ENV) { config = require("@/config/production.json"); } else { config = require("@/config/test.json"); diff --git a/src/store/modules/infobases.js b/src/store/modules/infobases.js index 8d6c13f..5746e47 100644 --- a/src/store/modules/infobases.js +++ b/src/store/modules/infobases.js @@ -120,16 +120,14 @@ export default { } }, async updateInfobaseURL(ctx, { name, url }) { - const infobase = ctx.getters.getInfobaseByName(name); const data = { - ...infobase, url, }; ctx.commit("lockInfobase", name); try { - await axios.post(`${api_base}/publications`, data); + await axios.post(`${api_base}/publications/${name}/url`, data); ctx.commit("setInfobaseURL", { name, url }); ctx.commit("setApacheNeedRestart", null, { root: true }); ctx.commit("setErrorMessage", "");