remaining backend interactor removals
This commit is contained in:
parent
28efd7ebd2
commit
0d9709825f
45 changed files with 1118 additions and 856 deletions
|
|
@ -1,8 +1,11 @@
|
|||
import FollowCard from 'src/components/follow_card/follow_card.vue'
|
||||
import apiService from '../../services/api/api.service.js'
|
||||
|
||||
import { useCredentialsStore } from 'src/stores/credentials.js'
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
|
||||
import { fetchUser, suggestions } from 'src/services/api/api.service.js'
|
||||
|
||||
const WhoToFollow = {
|
||||
components: {
|
||||
FollowCard,
|
||||
|
|
@ -17,21 +20,22 @@ const WhoToFollow = {
|
|||
},
|
||||
methods: {
|
||||
showWhoToFollow(reply) {
|
||||
reply.forEach((i) => {
|
||||
this.$store.state.api.backendInteractor
|
||||
.fetchUser({ id: i.acct })
|
||||
.then((externalUser) => {
|
||||
if (!externalUser.error) {
|
||||
this.$store.commit('addNewUsers', [externalUser])
|
||||
this.users.push(externalUser)
|
||||
}
|
||||
})
|
||||
reply.forEach(({ id }) => {
|
||||
fetchUser({
|
||||
id,
|
||||
credentials: useCredentialsStore().current,
|
||||
}).then((externalUser) => {
|
||||
if (!externalUser.error) {
|
||||
this.$store.commit('addNewUsers', [externalUser])
|
||||
this.users.push(externalUser)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
getWhoToFollow() {
|
||||
const credentials = this.$store.state.users.currentUser.credentials
|
||||
const credentials = useCredentialsStore().current
|
||||
if (credentials) {
|
||||
apiService.suggestions({ credentials }).then((reply) => {
|
||||
suggestions({ credentials }).then((reply) => {
|
||||
this.showWhoToFollow(reply)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue