traxxx/assets/js/networks/actions.js

23 lines
521 B
JavaScript
Raw Normal View History

import { get } from '../api';
function initNetworksActions(_store, _router) {
async function fetchNetworks({ _commit }, networkId) {
const networks = await get(`/networks/${networkId || ''}`);
return networks;
}
async function fetchNetworkReleases({ _commit }, networkId) {
const releases = await get(`/networks/${networkId}/releases`);
return releases;
}
return {
fetchNetworks,
fetchNetworkReleases,
};
}
export default initNetworksActions;