fix production build issues
This commit is contained in:
parent
b67a1cccd5
commit
e9360e5082
|
@ -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 }})
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
},
|
||||
computed: {
|
||||
results: function() {
|
||||
console.log("results:"+this.$store.state.searchResults)
|
||||
return this.$store.state.searchResults
|
||||
}
|
||||
},
|
||||
|
|
|
@ -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)
|
||||
})
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue