Ivan - Fix custom responses not being retrieved bug.

This commit is contained in:
ivan 2017-06-28 04:28:04 -03:00
parent 8e7694db0f
commit 2e54fda1e3
1 changed files with 5 additions and 5 deletions

View File

@ -14,11 +14,11 @@ export default {
path: '/user/login',
data: loginData
}).then((result) => {
store.dispatch(this.getUserData(result.data.userId, result.data.token, result.data.staff));
if(result.data.staff) {
store.dispatch(AdminDataActions.retrieveCustomResponses());
}
store.dispatch(this.getUserData(result.data.userId, result.data.token, result.data.staff)).then(() => {
if(result.data.staff) {
store.dispatch(AdminDataActions.retrieveCustomResponses());
}
});
resolve(result);
}).catch((result) => {