remaining backend interactor removals
This commit is contained in:
parent
28efd7ebd2
commit
0d9709825f
45 changed files with 1118 additions and 856 deletions
|
|
@ -1,10 +1,10 @@
|
|||
import { shuffle } from 'lodash'
|
||||
|
||||
import apiService from '../../services/api/api.service.js'
|
||||
|
||||
import { useCredentialsStore } from 'src/stores/credentials.js'
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
|
||||
import { fetchUser, suggestions } from 'src/services/api/api.service.js'
|
||||
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
|
||||
|
||||
function showWhoToFollow(panel, reply) {
|
||||
|
|
@ -18,14 +18,15 @@ function showWhoToFollow(panel, reply) {
|
|||
toFollow.img = img
|
||||
toFollow.name = name
|
||||
|
||||
panel.$store.state.api.backendInteractor
|
||||
.fetchUser({ id: name })
|
||||
.then((externalUser) => {
|
||||
if (!externalUser.error) {
|
||||
panel.$store.commit('addNewUsers', [externalUser])
|
||||
toFollow.id = externalUser.id
|
||||
}
|
||||
})
|
||||
fetchUser({
|
||||
id: name,
|
||||
credentials: useCredentialsStore().current,
|
||||
}).then((externalUser) => {
|
||||
if (!externalUser.error) {
|
||||
panel.$store.commit('addNewUsers', [externalUser])
|
||||
toFollow.id = externalUser.id
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -35,7 +36,7 @@ function getWhoToFollow(panel) {
|
|||
panel.usersToFollow.forEach((toFollow) => {
|
||||
toFollow.name = 'Loading...'
|
||||
})
|
||||
apiService.suggestions({ credentials }).then((reply) => {
|
||||
suggestions({ credentials }).then((reply) => {
|
||||
showWhoToFollow(panel, reply)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue