This commit is contained in:
Henry Jameson 2019-03-27 22:04:59 +02:00
parent fb2aca06de
commit 0a031aae20

View file

@ -219,8 +219,8 @@ const users = {
addFriends ({ rootState, commit }, fetchBy) { addFriends ({ rootState, commit }, fetchBy) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const user = rootState.users.usersObject[fetchBy] const user = rootState.users.usersObject[fetchBy]
const sinceId = user.lastFriendId const maxId = user.lastFriendId
rootState.api.backendInteractor.fetchFriends({ id: user.id, sinceId }) rootState.api.backendInteractor.fetchFriends({ id: user.id, maxId })
.then((friends) => { .then((friends) => {
commit('addFriends', { id: user.id, friends }) commit('addFriends', { id: user.id, friends })
resolve(friends) resolve(friends)
@ -231,8 +231,8 @@ const users = {
}, },
addFollowers ({ rootState, commit }, fetchBy) { addFollowers ({ rootState, commit }, fetchBy) {
const user = rootState.users.usersObject[fetchBy] const user = rootState.users.usersObject[fetchBy]
const sinceId = user.lastFollowerId const maxId = user.lastFollowerId
return rootState.api.backendInteractor.fetchFollowers({ id: user.id, sinceId }) return rootState.api.backendInteractor.fetchFollowers({ id: user.id, maxId })
.then((followers) => { .then((followers) => {
commit('addFollowers', { id: user.id, followers }) commit('addFollowers', { id: user.id, followers })
return followers return followers