From 1fd9291cdbe1b18b797ac6e3879585e60a3c073a Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 5 Sep 2020 16:44:44 +0200 Subject: [PATCH] show message after reloading configuration --- src/store/modules/ftbot.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/store/modules/ftbot.ts b/src/store/modules/ftbot.ts index 43f86b21..6fb7d537 100644 --- a/src/store/modules/ftbot.ts +++ b/src/store/modules/ftbot.ts @@ -171,8 +171,16 @@ export default { stopBuy() { return api.post('/stopbuy', {}).catch(console.error); }, - reloadConfig() { - return api.post('/reload_config', {}).catch(console.error); + async reloadConfig({ dispatch }) { + 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) { try {