|
@@ -112,20 +112,11 @@ const actions = { |
|
|
error => commit('logoutFailure', error) |
|
|
error => commit('logoutFailure', error) |
|
|
); |
|
|
); |
|
|
}, |
|
|
}, |
|
|
restore({ dispatch, commit }, { shortKey, longKey, password, systemConfigs, messages, errors }) { |
|
|
|
|
|
commit('restoreRequest'); |
|
|
|
|
|
systemConfigs.restoringInProgress = true; |
|
|
|
|
|
|
|
|
restore({ commit }, { shortKey, longKey, password, systemConfigs, messages, errors }) { |
|
|
|
|
|
commit('restoreRequest', systemConfigs); |
|
|
userService.restore(shortKey, longKey, password, messages, errors) |
|
|
userService.restore(shortKey, longKey, password, messages, errors) |
|
|
.then( |
|
|
|
|
|
ok => { |
|
|
|
|
|
commit('restoreSuccess'); |
|
|
|
|
|
systemConfigs.awaitingRestore = false; |
|
|
|
|
|
}, |
|
|
|
|
|
error => { |
|
|
|
|
|
commit('restoreFailure', error); |
|
|
|
|
|
systemConfigs.restoringInProgress = false; |
|
|
|
|
|
} |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
.then(ok => commit('restoreSuccess', systemConfigs), |
|
|
|
|
|
error => commit('restoreFailure', systemConfigs, error)); |
|
|
}, |
|
|
}, |
|
|
forgotPassword({ commit }, {username, messages, errors}) { |
|
|
forgotPassword({ commit }, {username, messages, errors}) { |
|
|
commit('forgotPasswordRequest'); |
|
|
commit('forgotPasswordRequest'); |
|
@@ -309,14 +300,17 @@ const mutations = { |
|
|
console.log('logout failed: '+JSON.stringify(error)); |
|
|
console.log('logout failed: '+JSON.stringify(error)); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
restoreRequest(state) { |
|
|
|
|
|
|
|
|
restoreRequest(state, systemConfigs) { |
|
|
state.status = Object.assign({}, state.status, {restoring: true}); |
|
|
state.status = Object.assign({}, state.status, {restoring: true}); |
|
|
|
|
|
systemConfigs.restoringInProgress = true; |
|
|
}, |
|
|
}, |
|
|
restoreSuccess(state) { |
|
|
|
|
|
|
|
|
restoreSuccess(state, systemConfigs) { |
|
|
state.status = Object.assign({}, state.status, {restoring: false}); |
|
|
state.status = Object.assign({}, state.status, {restoring: false}); |
|
|
|
|
|
systemConfigs.awaitingRestore = false; |
|
|
}, |
|
|
}, |
|
|
restoreFailure(state, error) { |
|
|
|
|
|
|
|
|
restoreFailure(state, systemConfigs, error) { |
|
|
state.status = Object.assign({}, state.status, {restoring: false}); |
|
|
state.status = Object.assign({}, state.status, {restoring: false}); |
|
|
|
|
|
systemConfigs.restoringInProgress = false; |
|
|
console.log('restore failed: ' + JSON.stringify(error)); |
|
|
console.log('restore failed: ' + JSON.stringify(error)); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|