UNPKG

cluedin-widget

Version:

This is the project for creating and managing widgets in CluedIn.

18 lines (14 loc) 380 B
var constants = require( '../constants' ); var unauthorizedRequest = () => { return { type: constants.generic.UNAUTHORIZED_REQUEST } }; export function unauthorized( dispatch, action ) { return ( resp ) => { if ( resp.response.status === 401 ) { dispatch( unauthorizedRequest() ); } return dispatch( action() ); }; }