Use selected channel in search
This commit is contained in:
parent
d07c2ae942
commit
af16c2470f
|
@ -260,8 +260,12 @@ export default new Vuex.Store({
|
||||||
closeSearch({commit}) {
|
closeSearch({commit}) {
|
||||||
commit('setSearchPopupState', false)
|
commit('setSearchPopupState', false)
|
||||||
},
|
},
|
||||||
startQuery({commit}, query) {
|
startQuery({state, commit}, query) {
|
||||||
fetch(this.state.microsubEndpoint + '?action=search&channel=global&query='+query, {
|
let channel = 'global'
|
||||||
|
if (state.channel.uid !== null) {
|
||||||
|
channel = state.channel.uid
|
||||||
|
}
|
||||||
|
fetch(this.state.microsubEndpoint + '?action=search&channel='+channel+'&query='+query, {
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': 'Bearer ' + this.state.access_token
|
'Authorization': 'Bearer ' + this.state.access_token
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user