2019-11-10 03:20:22 +00:00
|
|
|
import { get } from '../api';
|
|
|
|
|
2019-11-15 04:10:59 +00:00
|
|
|
function initActorActions(store, _router) {
|
2019-11-10 03:20:22 +00:00
|
|
|
async function fetchActors({ _commit }, actorId) {
|
|
|
|
const networks = await get(`/actors/${actorId || ''}`);
|
|
|
|
|
|
|
|
return networks;
|
|
|
|
}
|
|
|
|
|
|
|
|
async function fetchActorReleases({ _commit }, actorId) {
|
2019-11-15 04:10:59 +00:00
|
|
|
const releases = await get(`/actors/${actorId}/releases`, {
|
|
|
|
filter: store.state.ui.filter,
|
|
|
|
after: store.getters.after,
|
|
|
|
before: store.getters.before,
|
|
|
|
});
|
2019-11-10 03:20:22 +00:00
|
|
|
|
|
|
|
return releases;
|
|
|
|
}
|
|
|
|
|
|
|
|
return {
|
|
|
|
fetchActors,
|
|
|
|
fetchActorReleases,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export default initActorActions;
|