fix NODE_ENV + set url
This commit is contained in:
parent
9c776542d5
commit
daadee9190
@ -1,6 +1,6 @@
|
|||||||
let config;
|
let config;
|
||||||
|
|
||||||
if ("production" == process.env.NODE_EN) {
|
if ("production" == process.env.NODE_ENV) {
|
||||||
config = require("@/config/production.json");
|
config = require("@/config/production.json");
|
||||||
} else {
|
} else {
|
||||||
config = require("@/config/test.json");
|
config = require("@/config/test.json");
|
||||||
|
@ -120,16 +120,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async updateInfobaseURL(ctx, { name, url }) {
|
async updateInfobaseURL(ctx, { name, url }) {
|
||||||
const infobase = ctx.getters.getInfobaseByName(name);
|
|
||||||
const data = {
|
const data = {
|
||||||
...infobase,
|
|
||||||
url,
|
url,
|
||||||
};
|
};
|
||||||
|
|
||||||
ctx.commit("lockInfobase", name);
|
ctx.commit("lockInfobase", name);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await axios.post(`${api_base}/publications`, data);
|
await axios.post(`${api_base}/publications/${name}/url`, data);
|
||||||
ctx.commit("setInfobaseURL", { name, url });
|
ctx.commit("setInfobaseURL", { name, url });
|
||||||
ctx.commit("setApacheNeedRestart", null, { root: true });
|
ctx.commit("setApacheNeedRestart", null, { root: true });
|
||||||
ctx.commit("setErrorMessage", "");
|
ctx.commit("setErrorMessage", "");
|
||||||
|
Loading…
Reference in New Issue
Block a user