mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 17:33:14 +01:00
20 lines
390 B
JavaScript
20 lines
390 B
JavaScript
'use strict';
|
|
|
|
import requests from '../utils/requests';
|
|
|
|
import PieceActions from '../actions/piece_actions';
|
|
|
|
|
|
const PieceSource = {
|
|
lookupPiece: {
|
|
remote(state, pieceId) {
|
|
return requests.get('piece', { piece_id: pieceId });
|
|
},
|
|
|
|
success: PieceActions.successFetchPiece,
|
|
error: PieceActions.errorPiece
|
|
}
|
|
};
|
|
|
|
export default PieceSource;
|