mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 01:39:36 +01:00
22 lines
422 B
JavaScript
22 lines
422 B
JavaScript
'use strict';
|
|
|
|
import request from '../utils/request';
|
|
|
|
import PieceActions from '../actions/piece_actions';
|
|
|
|
|
|
const PieceSource = {
|
|
lookupPiece: {
|
|
remote(state, pieceId) {
|
|
return request('piece', {
|
|
urlTemplateSpec: { pieceId }
|
|
});
|
|
},
|
|
|
|
success: PieceActions.successFetchPiece,
|
|
error: PieceActions.errorPiece
|
|
}
|
|
};
|
|
|
|
export default PieceSource;
|