wappsto-redux
Advanced tools
Comparing version 3.5.5 to 3.5.7
@@ -6,3 +6,3 @@ import querystring from 'query-string'; | ||
import { addEntities, removeEntities } from './entities'; | ||
import { invalidSession } from './session'; | ||
import { invalidSession, limitReached } from './session'; | ||
@@ -231,4 +231,8 @@ export const REQUEST_PENDING = 'REQUEST_PENDING'; | ||
} else { | ||
if(response.json && response.json.code === 117000000){ | ||
dispatch(invalidSession()); | ||
if(response.json){ | ||
if(response.json.code === 117000000){ | ||
dispatch(invalidSession()); | ||
} else if(response.json.code === 300098){ | ||
dispatch(limitReached()); | ||
} | ||
} | ||
@@ -235,0 +239,0 @@ if(id){ |
export const ADD_SESSION = "ADD_SESSION"; | ||
export const REMOVE_SESSION = "REMOVE_SESSION"; | ||
export const INVALID_SESSION = "INVALID_SESSION"; | ||
export const LIMIT_REACHED = "LIMIT_REACHED"; | ||
@@ -23,1 +24,7 @@ export function addSession(data){ | ||
} | ||
export function limitReached(){ | ||
return { | ||
type: LIMIT_REACHED | ||
} | ||
} |
{ | ||
"name": "wappsto-redux", | ||
"version": "3.5.5", | ||
"version": "3.5.7", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
import { | ||
ADD_SESSION, | ||
REMOVE_SESSION, | ||
INVALID_SESSION | ||
INVALID_SESSION, | ||
LIMIT_REACHED | ||
} from "../actions/session"; | ||
@@ -23,2 +24,9 @@ import reducerRegistry from "../util/reducerRegistry"; | ||
return state; | ||
case LIMIT_REACHED: | ||
if(state && state.meta && state.meta.id){ | ||
return Object.assign({}, state, { | ||
limitReached: true | ||
}); | ||
} | ||
return state; | ||
default: | ||
@@ -25,0 +33,0 @@ return state; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53158
1387