Compare commits

...

2 Commits

Author SHA1 Message Date
38c46ec73b Allow global search on the home channel 2021-10-20 22:18:12 +02:00
4230782091 Make "preview" use POST 2021-10-20 22:17:55 +02:00
2 changed files with 7 additions and 3 deletions

View File

@ -120,9 +120,13 @@
}, },
showFeed(feed) { showFeed(feed) {
feed.loading = true feed.loading = true
let url = this.$store.state.microsubEndpoint + '?action=preview&url=' + encodeURIComponent(feed.url) let url = this.$store.state.microsubEndpoint
let formData = new URLSearchParams();
formData.set('action', 'preview')
formData.set('url', feed.url)
return fetch(url, { return fetch(url, {
method: 'GET', method: 'POST',
body: formData,
headers: { headers: {
'Authorization': 'Bearer ' + this.$store.state.access_token 'Authorization': 'Bearer ' + this.$store.state.access_token
} }

View File

@ -262,7 +262,7 @@ export default new Vuex.Store({
}, },
startQuery({state, commit}, query) { startQuery({state, commit}, query) {
let channel = 'global' let channel = 'global'
if (state.channel.uid !== null) { if (state.channel !== null && state.channel.uid !== null && state.channel.uid !== 'home') {
channel = state.channel.uid channel = state.channel.uid
} }
return fetch(this.state.microsubEndpoint + '?action=search&channel='+channel+'&query='+query, { return fetch(this.state.microsubEndpoint + '?action=search&channel='+channel+'&query='+query, {