diff --git a/src/backend/api.js b/src/backend/api.js index b74b0264..4c8bbfac 100644 --- a/src/backend/api.js +++ b/src/backend/api.js @@ -58,6 +58,26 @@ export const getCurrentPolicies = async () => { return data.items } +export const getPolicyByDate = async ({ policyType, activeFrom }) => { + const { data } = await axios.get(`/v1/policies/${policyType}/by_active_from/${activeFrom}`) + return data +} + +export const getAllPoliciesByType = async ({ policyType }) => { + const { data } = await axios.get(`/v1/policies/${policyType}`) + return data.items +} + +export const getCurrentPolicyByType = async ({ policyType }) => { + const { data } = await axios.get(`/v1/policies/${policyType}/current`) + return data +} + +export const getUpcomingPolicyByType = async ({ policyType }) => { + const { data } = await axios.get(`/v1/policies/${policyType}/upcoming`) + return data +} + /* Wiki endpoints */ export const countWikis = async () => (await axios.get('/wiki/count')).data.data // TODO This doesn't seem to exist and not used? export const myWikis = async () => (await axios.post('/wiki/mine')).data @@ -102,10 +122,6 @@ export const wikiDiscovery = async ({ sort, direction, active, currentPage, resu })).data } -export const policyByDate = async ({ policyType, activeFrom }) => { - return (await axios.get(`/v1/policies/${policyType}/by_active_from/${activeFrom}`)).data -} - export const importEntities = async ({ wikiId, entityIds = [ diff --git a/src/components/Layout/Foot.vue b/src/components/Layout/Foot.vue index d3518768..1070f3a2 100644 --- a/src/components/Layout/Foot.vue +++ b/src/components/Layout/Foot.vue @@ -21,7 +21,7 @@