diff --git a/client/coral-framework/actions/assets.js b/client/coral-framework/actions/assets.js deleted file mode 100644 index f778831b7..000000000 --- a/client/coral-framework/actions/assets.js +++ /dev/null @@ -1,16 +0,0 @@ -import * as actions from '../constants/assets'; -import coralApi from '../helpers/response'; -import {addItem} from './items'; - -export const fetchMulitpleAssets = ids => { - return dispatch => { - dispatch({type: actions.MULTIPLE_ASSETS_REQUEST}); - - coralApi(`/assets/multi?ids=${encodeURIComponent(ids.join(','))}`) - .then(assets => { - assets.forEach(asset => dispatch(addItem(asset, 'assets'))); - dispatch({type: actions.MULTIPLE_ASSETS_SUCCESS, assets: assets.map(asset => asset.id)}); - }) - .catch(error => dispatch({type: actions.MULTIPLE_ASSSETS_FAILURE, error})); - }; -}; diff --git a/client/coral-settings/containers/SettingsContainer.js b/client/coral-settings/containers/SettingsContainer.js index 0981bafe3..8f1b32687 100644 --- a/client/coral-settings/containers/SettingsContainer.js +++ b/client/coral-settings/containers/SettingsContainer.js @@ -2,7 +2,6 @@ import React, {Component} from 'react'; import {connect} from 'react-redux'; import {saveBio, fetchCommentsByUserId} from 'coral-framework/actions/user'; -import {fetchMulitpleAssets} from 'coral-framework/actions/assets'; import BioContainer from './BioContainer'; import NotLoggedIn from '../components/NotLoggedIn'; @@ -66,8 +65,7 @@ const mapStateToProps = state => ({ const mapDispatchToProps = dispatch => ({ saveBio: (user_id, formData) => dispatch(saveBio(user_id, formData)), - fetchCommentsByUserId: userId => dispatch(fetchCommentsByUserId(userId)), - fetchMulitpleAssets: assetIds => dispatch(fetchMulitpleAssets(assetIds)) + fetchCommentsByUserId: userId => dispatch(fetchCommentsByUserId(userId)) }); export default connect(