api calls implemented

This commit is contained in:
ManjaroOne666 2019-02-12 12:41:44 +00:00
parent ab85aa3b2f
commit 737ab1668d
4 changed files with 7 additions and 22 deletions

View File

@ -2,8 +2,7 @@
* Galleries - title not distinguishable on light images
* Galleries - navigation icons not obvious enough with light background thumbs
* Galleries - thumbs on desktop - way to make them stand out aginst the image
* Galleries - sort thumbs by sort_order
* API
* General - sort things by sort_order
* mailer
* remove testing/dev mode or whatever its called from axios in nuxt.config.js

View File

@ -55,10 +55,9 @@ export default {
}
},
asyncData () {
return new Promise ((resolve, reject) => {
resolve({ imageUrl: "https://via.placeholder.com/1920x1080" })
})
async asyncData ({ $axios }) {
const { imageUrl } = await $axios.$get('/api/v1/page/about')
return { imageUrl }
},
}

View File

@ -161,10 +161,9 @@ export default {
},
},
asyncData () {
return new Promise ((resolve, reject) => {
resolve({ imageUrl: "https://via.placeholder.com/1920x1080" })
})
async asyncData ({ $axios }) {
const { imageUrl } = await $axios.$get('/api/v1/page/about')
return { imageUrl }
},
}
</script>

View File

@ -3,18 +3,6 @@ export const state = () => ({
socialNav: [],
})
// export const actions = {
// load ({ commit }) {
// return new Promise(resolve => {
// setTimeout(() => {
// commit('updateSiteNav', SITE_NAV)
// commit('updateSocialNav', SOCIAL_NAV)
// resolve()
// }, 300)
// })
// }
// }
//
export const getters = {
siteNav: state => {
return state.siteNav