diff --git a/frontend/app/api_middleware.js b/frontend/app/api_middleware.js index 9c71c6d19..f98ad344b 100644 --- a/frontend/app/api_middleware.js +++ b/frontend/app/api_middleware.js @@ -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(); diff --git a/frontend/app/duck/user.js b/frontend/app/duck/user.js index fc627e214..ce0f66fec 100644 --- a/frontend/app/duck/user.js +++ b/frontend/app/duck/user.js @@ -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');