remaining backend interactor removals

This commit is contained in:
Henry Jameson 2026-06-15 20:02:22 +03:00
commit 0d9709825f
45 changed files with 1118 additions and 856 deletions

View file

@ -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)
})
}