Advertisement
Guest User

Untitled

a guest
Oct 28th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. import { get, post, put } from '../../utils/APIUtils'
  2.  
  3.  
  4. export function fetchNotifications() {
  5.  
  6. return dispatch => {
  7. dispatch(fetchNotificationsRequest())
  8. // need to mock this get call
  9. return get('/notifications/self')
  10. .then(json => dispatch(fetchNotificationsSuccess(json.body)))
  11. .catch(err => dispatch(fetchNotificationsFailure(err)))
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement