From 3b4c4aa38f435d695c2e955b33a59feb7c22afd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loun=C3=A8s=20Ksouri?= Date: Fri, 6 Nov 2020 12:59:27 +0100 Subject: [PATCH] Corrected mistake in POST response handling --- src/store/modules/user.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 76bb3494..69b5eb7f 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -83,14 +83,17 @@ const actions = { }, async updateSetting({ commit }, { setting, value }) { - const settings = await API.post( + const { data: settings } = await API.post( `${process.env.VUE_APP_MANAGER_API_URL}/v1/account/settings`, - { - setting, - value + { + setting, + value } ); - commit("setSettings", settings); + + if(settings) { + commit("setSettings", settings); + } }, async getSeed({ commit, state, dispatch }, plainTextPassword) {