e624ed8c51
This reverts commit 3b47edc3b9
to allow putting back in the original commits.
33 lines
794 B
JavaScript
33 lines
794 B
JavaScript
// @flow
|
|
import * as ACTIONS from 'constants/action_types';
|
|
import { doClaimSearch } from 'lbry-redux';
|
|
|
|
export const doFetchNoSourceClaims = (channelId: string) => async (dispatch: Dispatch, getState: GetState) => {
|
|
dispatch({
|
|
type: ACTIONS.FETCH_NO_SOURCE_CLAIMS_STARTED,
|
|
data: channelId,
|
|
});
|
|
try {
|
|
await dispatch(
|
|
doClaimSearch({
|
|
channel_ids: [channelId],
|
|
has_no_source: true,
|
|
claim_type: ['stream'],
|
|
no_totals: true,
|
|
page_size: 20,
|
|
page: 1,
|
|
include_is_my_output: true,
|
|
})
|
|
);
|
|
|
|
dispatch({
|
|
type: ACTIONS.FETCH_NO_SOURCE_CLAIMS_COMPLETED,
|
|
data: channelId,
|
|
});
|
|
} catch (error) {
|
|
dispatch({
|
|
type: ACTIONS.FETCH_NO_SOURCE_CLAIMS_FAILED,
|
|
data: channelId,
|
|
});
|
|
}
|
|
};
|