fix production build issues

This commit is contained in:
Chris Sexton 2019-11-08 00:35:20 -05:00
parent b67a1cccd5
commit e9360e5082
5 changed files with 4 additions and 11 deletions

View File

@ -51,7 +51,7 @@
methods: {
newFile: function() {
this.$store.dispatch('newFile')
.catch(err => console.log(err))
.catch(() => {})
.then(file => {
this.$store.dispatch('updateSearch')
this.$router.push({ name: 'console-slug', params: { slug: file.Slug }})

View File

@ -78,9 +78,7 @@
if (res.data.Slug != this.$route.params.slug)
this.$router.replace({params: { slug: res.data.Slug }})
})
.catch(err => {
console.log('err:' + err)
})
.catch(() => { })
}
},
components: {TagList, Editor}

View File

@ -8,7 +8,7 @@
</b-row>
<b-row>
<b-col cols="10">
<label for="tagList" >Tags</label>
<label for="tagList" :hidden="!tags">Tags</label>
</b-col>
</b-row>
<b-row>

View File

@ -37,7 +37,6 @@
},
computed: {
results: function() {
console.log("results:"+this.$store.state.searchResults)
return this.$store.state.searchResults
}
},

View File

@ -73,7 +73,6 @@ export default new Vuex.Store({
updateSearch: function ({commit, state}) {
return new Promise((resolve, reject) => {
let query = state.query || ""
console.log("running search for: " + query)
axios.get('/v1/entries?query='+query)
.catch(err => {
state.addError(err)
@ -86,7 +85,6 @@ export default new Vuex.Store({
})
},
saveFile: function({state}) {
console.log(state.file)
if (state.file)
return axios.put('/v1/entries/'+state.file.Slug, state.file)
},
@ -94,11 +92,9 @@ export default new Vuex.Store({
axios.delete('/v1/entries/'+slug)
.catch(err => {
commit('addError', err)
console.log(err)
})
.then(res => {
.then(() => {
dispatch('updateSearch')
console.log(res.status, res.statusText)
})
}
},