Browse Source

Use selected channel in search

master
Peter Stuifzand 2 months ago
parent
commit
af16c2470f
  1. 8
      src/store.js

8
src/store.js

@ -260,8 +260,12 @@ export default new Vuex.Store({
closeSearch({commit}) {
commit('setSearchPopupState', false)
},
startQuery({commit}, query) {
fetch(this.state.microsubEndpoint + '?action=search&channel=global&query='+query, {
startQuery({state, commit}, query) {
let channel = 'global'
if (state.channel.uid !== null) {
channel = state.channel.uid
}
fetch(this.state.microsubEndpoint + '?action=search&channel='+channel+'&query='+query, {
headers: {
'Authorization': 'Bearer ' + this.state.access_token
},

Loading…
Cancel
Save