Fix dynamic route requests, add auth middleware

This commit is contained in:
Mark Cooper 2021-08-23 19:37:40 -05:00
parent f83c5dd440
commit bf38004b5e
11 changed files with 29 additions and 25 deletions

View file

@ -39,7 +39,11 @@ export const getters = {
}
export const actions = {
load({ commit }) {
load({ commit, rootState }) {
if (!rootState.user || !rootState.user.user) {
console.error('audiobooks/load - User not set')
return
}
this.$axios
.$get(`/api/audiobooks`)
.then((data) => {