fix NODE_ENV + set url

This commit is contained in:
Dmitry Belyaev 2021-06-15 16:43:27 +03:00
parent 9c776542d5
commit daadee9190
Signed by: b4tman
GPG Key ID: 41A00BF15EA7E5F3
2 changed files with 2 additions and 4 deletions

View File

@ -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");

View File

@ -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", "");