Bugfix: don't sign out if the tournament creation backend call fails

This commit is contained in:
Felix Hamme 2019-06-17 21:23:15 +02:00
parent 59153eca7a
commit 5230b0b52b
1 changed files with 4 additions and 1 deletions

View File

@ -183,7 +183,10 @@ const reducerTournamentinfo = (state = defaultStateTournamentinfo, action) => {
postRequest(action.state, '/tournaments', action.parameters.tournament).then(resp => {
storeOptionalToken(resp);
action.parameters.successCallback();
}).catch(() => {
}).catch(error => {
if (error.response) {
storeOptionalToken(error.response);
}
action.parameters.errorCallback();
});
return Object.assign({}, state, {});