traxxx/assets/js/actors/actions.js

27 lines
632 B
JavaScript

import { get } from '../api';
function initActorActions(store, _router) {
async function fetchActors({ _commit }, actorId) {
const networks = await get(`/actors/${actorId || ''}`);
return networks;
}
async function fetchActorReleases({ _commit }, actorId) {
const releases = await get(`/actors/${actorId}/releases`, {
filter: store.state.ui.filter,
after: store.getters.after,
before: store.getters.before,
});
return releases;
}
return {
fetchActors,
fetchActorReleases,
};
}
export default initActorActions;