Sha256: 3bd063b94f90ada3e0ca03471cccea7c972cf60e5a5a5e7bc41ea67d07e3c802

Contents?: true

Size: 462 Bytes

Versions: 3

Compression:

Stored size: 462 Bytes

Contents

import * as types from '../constants/ActionTypes'
import 'isomorphic-fetch'

//const endpoint = 'http://localhost:3000'
const endpoint = ''

export function receiveStorages(storages) {
  return {
    type: types.STORAGE_RECEIVE,
    storages: storages
  }
}

export function searchStorages() {
  return dispatch => {
    return fetch(endpoint + '/api/storages')
      .then(response => response.json())
      .then(json => dispatch(receiveStorages(json)))
  }
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bouquet-0.2.2 store/private/static/app/actions/InventoryActions.js
bouquet-0.2.1 store/private/static/app/actions/InventoryActions.js
bouquet-0.2.0 store/private/static/app/actions/InventoryActions.js