Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
#599 Process status cleared after auth problems
Browse files Browse the repository at this point in the history
  • Loading branch information
damianprzygodzki committed Apr 20, 2017
1 parent 8b5124e commit 2e9a253
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/containers/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import {
import {
addNotification,
logoutSuccess,
getAvailableLang
getAvailableLang,
setProcessSaved
} from '../actions/AppActions';

import '../assets/css/styles.css';
Expand All @@ -41,6 +42,7 @@ axios.interceptors.response.use(function (response) {
* Authorization error
*/
if(error.response.status == 401){
store.dispatch(setProcessSaved());
store.dispatch(logoutSuccess());
store.dispatch(push('/login?redirect=true'));
}else if(error.response.status != 404){
Expand Down

0 comments on commit 2e9a253

Please sign in to comment.