1
0
mirror of https://github.com/ascribe/onion.git synced 2025-01-03 18:35:09 +01:00
onion/js/sources/piece_source.js
2016-01-14 16:44:52 +01:00

20 lines
399 B
JavaScript

'use strict';
import requests from '../utils/requests';
import PieceActions from '../actions/piece_actions';
const PieceSource = {
lookupPiece: {
remote(state) {
return requests.get('piece', { piece_id: state.pieceMeta.idToFetch });
},
success: PieceActions.successFetchPiece,
error: PieceActions.errorPiece
}
};
export default PieceSource;