traxxx/assets/js/actors/actions.js

23 lines
495 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`);
return releases;
}
return {
fetchActors,
fetchActorReleases,
};
}
export default initActorActions;