aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2016-11-26 18:57:08 +0100
committerRoger Braun <roger@rogerbraun.net>2016-11-26 18:57:08 +0100
commit215e51f764660442405b47c2620c62681ef5a057 (patch)
tree1ae3ef9f92701cca32558732a3b025ed7db824e8 /src/components
parentb1f9f6395c6f1e621eec64f8586649dd6f04daf1 (diff)
Move some interactions to the backendInteractor
The idea is that all interactions should move there, so components don't have to pass around credentials all the time.
Diffstat (limited to 'src/components')
-rw-r--r--src/components/conversation/conversation.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/components/conversation/conversation.js b/src/components/conversation/conversation.js
index ea26d958..20540ed3 100644
--- a/src/components/conversation/conversation.js
+++ b/src/components/conversation/conversation.js
@@ -1,6 +1,5 @@
import { find, filter, sortBy, toInteger } from 'lodash'
import Status from '../status/status.vue'
-import apiService from '../../services/api/api.service.js'
const conversation = {
computed: {
@@ -32,12 +31,12 @@ const conversation = {
fetchConversation () {
if (this.status) {
const conversationId = this.status.statusnet_conversation_id
- apiService.fetchConversation({id: conversationId})
+ this.$store.state.api.backendInteractor.fetchConversation({id: conversationId})
.then((statuses) => this.$store.dispatch('addNewStatuses', { statuses }))
.then(() => this.$store.commit('updateTimestamps'))
} else {
const id = this.$route.params.id
- apiService.fetchStatus({id})
+ this.$store.state.api.backendInteractor.fetchStatus({id})
.then((status) => this.$store.dispatch('addNewStatuses', { statuses: [status] }))
.then(() => this.fetchConversation())
}