change(ui): changed 403 logout action
This commit is contained in:
parent
286b0b25f8
commit
dcde8574ea
2 changed files with 3 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import logger from 'App/logger';
|
||||
import APIClient from './api_client';
|
||||
import { LOGIN, UPDATE_JWT } from './duck/user';
|
||||
import { FETCH_ACCOUNT, UPDATE_JWT } from './duck/user';
|
||||
|
||||
export default () => (next) => (action) => {
|
||||
const { types, call, ...rest } = action;
|
||||
|
|
@ -14,7 +14,7 @@ export default () => (next) => (action) => {
|
|||
return call(client)
|
||||
.then(async (response) => {
|
||||
if (response.status === 403) {
|
||||
next({ type: LOGIN.FAILURE });
|
||||
next({ type: FETCH_ACCOUNT.FAILURE });
|
||||
}
|
||||
if (!response.ok) {
|
||||
const text = await response.text();
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ export const LOGIN = new RequestTypes('user/LOGIN');
|
|||
export const SIGNUP = new RequestTypes('user/SIGNUP');
|
||||
export const RESET_PASSWORD = new RequestTypes('user/RESET_PASSWORD');
|
||||
export const REQUEST_RESET_PASSWORD = new RequestTypes('user/REQUEST_RESET_PASSWORD');
|
||||
const FETCH_ACCOUNT = new RequestTypes('user/FETCH_ACCOUNT');
|
||||
export const FETCH_ACCOUNT = new RequestTypes('user/FETCH_ACCOUNT');
|
||||
const FETCH_TENANTS = new RequestTypes('user/FETCH_TENANTS');
|
||||
const UPDATE_ACCOUNT = new RequestTypes('user/UPDATE_ACCOUNT');
|
||||
const RESEND_EMAIL_VERIFICATION = new RequestTypes('user/RESEND_EMAIL_VERIFICATION');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue