Extract configQuery function
This commit is contained in:
parent
16ea750006
commit
7a498393f8
13
src/store.js
13
src/store.js
|
|
@ -205,19 +205,18 @@ export default new Vuex.Store({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
fetchSyndicationTargets() {
|
configQuery: function (key) {
|
||||||
let micropub = new Micropub({
|
let micropub = new Micropub({
|
||||||
token: this.state.access_token,
|
token: this.state.access_token,
|
||||||
micropubEndpoint: this.state.micropubEndpoint
|
micropubEndpoint: this.state.micropubEndpoint
|
||||||
})
|
})
|
||||||
return micropub.query('syndicate-to')
|
return micropub.query(key)
|
||||||
|
},
|
||||||
|
fetchSyndicationTargets() {
|
||||||
|
return this.configQuery('syndicate-to')
|
||||||
},
|
},
|
||||||
fetchDestinations() {
|
fetchDestinations() {
|
||||||
let micropub = new Micropub({
|
return this.configQuery('destination');
|
||||||
token: this.state.access_token,
|
|
||||||
micropubEndpoint: this.state.micropubEndpoint
|
|
||||||
})
|
|
||||||
return micropub.query('destination')
|
|
||||||
},
|
},
|
||||||
micropubPost(_, mf2post) {
|
micropubPost(_, mf2post) {
|
||||||
let micropub = new Micropub({
|
let micropub = new Micropub({
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user