}
private loadMoreFollowers (reset = false) {
- const pagination = this.restService.componentPaginationToRestPagination(this.followersPagination)
+ const pagination = this.restService.componentToRestPagination(this.followersPagination)
- this.followService.getFollowers({ pagination: pagination, sort: this.sort, state: 'accepted' })
- .subscribe(
- resultList => {
+ this.followService.getFollowers({ pagination, sort: this.sort, state: 'accepted' })
+ .subscribe({
+ next: resultList => {
if (reset) this.followers = []
const newFollowers = resultList.data.map(r => r.follower.host)
this.followersPagination.totalItems = resultList.total
},
- err => this.notifier.error(err.message)
- )
+ error: err => this.notifier.error(err.message)
+ })
}
private loadMoreFollowings (reset = false) {
- const pagination = this.restService.componentPaginationToRestPagination(this.followingsPagination)
+ const pagination = this.restService.componentToRestPagination(this.followingsPagination)
this.followService.getFollowing({ pagination, sort: this.sort, state: 'accepted' })
- .subscribe(
- resultList => {
+ .subscribe({
+ next: resultList => {
if (reset) this.followings = []
const newFollowings = resultList.data.map(r => r.following.host)
this.followingsPagination.totalItems = resultList.total
},
- err => this.notifier.error(err.message)
- )
+ error: err => this.notifier.error(err.message)
+ })
}
}