forked from DebaucheryLibrarian/traxxx
23 lines
479 B
JavaScript
23 lines
479 B
JavaScript
import { get } from '../api';
|
|
|
|
function initSitesActions(_store, _router) {
|
|
async function fetchSites({ _commit }, siteId) {
|
|
const sites = await get(`/sites/${siteId || ''}`);
|
|
|
|
return sites;
|
|
}
|
|
|
|
async function fetchSiteReleases({ _commit }, siteId) {
|
|
const releases = await get(`/sites/${siteId}/releases`);
|
|
|
|
return releases;
|
|
}
|
|
|
|
return {
|
|
fetchSites,
|
|
fetchSiteReleases,
|
|
};
|
|
}
|
|
|
|
export default initSitesActions;
|