forked from DebaucheryLibrarian/traxxx
23 lines
521 B
JavaScript
23 lines
521 B
JavaScript
|
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;
|