show message after reloading configuration

This commit is contained in:
Matthias 2020-09-05 16:44:44 +02:00
parent 1c58ee86c1
commit 1fd9291cdb

View File

@ -171,8 +171,16 @@ export default {
stopBuy() { stopBuy() {
return api.post('/stopbuy', {}).catch(console.error); return api.post('/stopbuy', {}).catch(console.error);
}, },
reloadConfig() { async reloadConfig({ dispatch }) {
return api.post('/reload_config', {}).catch(console.error); try {
const res = await api.post('/reload_config', {});
console.log(res.data);
dispatch('alerts/addAlert', { message: res.data.status }, { root: true });
return Promise.resolve(res);
} catch (error) {
console.error(error.resposne);
return Promise.reject(error);
}
}, },
async deleteTrade({ dispatch }, tradeid: string) { async deleteTrade({ dispatch }, tradeid: string) {
try { try {