diff options
Diffstat (limited to 'client/src/app/+admin/follows/followers-list/followers-list.component.ts')
-rw-r--r-- | client/src/app/+admin/follows/followers-list/followers-list.component.ts | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/client/src/app/+admin/follows/followers-list/followers-list.component.ts b/client/src/app/+admin/follows/followers-list/followers-list.component.ts index 4a312f6aa..b867b4ba5 100644 --- a/client/src/app/+admin/follows/followers-list/followers-list.component.ts +++ b/client/src/app/+admin/follows/followers-list/followers-list.component.ts | |||
@@ -35,17 +35,17 @@ export class FollowersListComponent extends RestTable implements OnInit { | |||
35 | follow.state = 'accepted' | 35 | follow.state = 'accepted' |
36 | 36 | ||
37 | this.followService.acceptFollower(follow) | 37 | this.followService.acceptFollower(follow) |
38 | .subscribe( | 38 | .subscribe({ |
39 | () => { | 39 | next: () => { |
40 | const handle = follow.follower.name + '@' + follow.follower.host | 40 | const handle = follow.follower.name + '@' + follow.follower.host |
41 | this.notifier.success($localize`${handle} accepted in instance followers`) | 41 | this.notifier.success($localize`${handle} accepted in instance followers`) |
42 | }, | 42 | }, |
43 | 43 | ||
44 | err => { | 44 | error: err => { |
45 | follow.state = 'pending' | 45 | follow.state = 'pending' |
46 | this.notifier.error(err.message) | 46 | this.notifier.error(err.message) |
47 | } | 47 | } |
48 | ) | 48 | }) |
49 | } | 49 | } |
50 | 50 | ||
51 | async rejectFollower (follow: ActorFollow) { | 51 | async rejectFollower (follow: ActorFollow) { |
@@ -54,19 +54,19 @@ export class FollowersListComponent extends RestTable implements OnInit { | |||
54 | if (res === false) return | 54 | if (res === false) return |
55 | 55 | ||
56 | this.followService.rejectFollower(follow) | 56 | this.followService.rejectFollower(follow) |
57 | .subscribe( | 57 | .subscribe({ |
58 | () => { | 58 | next: () => { |
59 | const handle = follow.follower.name + '@' + follow.follower.host | 59 | const handle = follow.follower.name + '@' + follow.follower.host |
60 | this.notifier.success($localize`${handle} rejected from instance followers`) | 60 | this.notifier.success($localize`${handle} rejected from instance followers`) |
61 | 61 | ||
62 | this.reloadData() | 62 | this.reloadData() |
63 | }, | 63 | }, |
64 | 64 | ||
65 | err => { | 65 | error: err => { |
66 | follow.state = 'pending' | 66 | follow.state = 'pending' |
67 | this.notifier.error(err.message) | 67 | this.notifier.error(err.message) |
68 | } | 68 | } |
69 | ) | 69 | }) |
70 | } | 70 | } |
71 | 71 | ||
72 | async deleteFollower (follow: ActorFollow) { | 72 | async deleteFollower (follow: ActorFollow) { |
@@ -75,27 +75,27 @@ export class FollowersListComponent extends RestTable implements OnInit { | |||
75 | if (res === false) return | 75 | if (res === false) return |
76 | 76 | ||
77 | this.followService.removeFollower(follow) | 77 | this.followService.removeFollower(follow) |
78 | .subscribe( | 78 | .subscribe({ |
79 | () => { | 79 | next: () => { |
80 | const handle = follow.follower.name + '@' + follow.follower.host | 80 | const handle = follow.follower.name + '@' + follow.follower.host |
81 | this.notifier.success($localize`${handle} removed from instance followers`) | 81 | this.notifier.success($localize`${handle} removed from instance followers`) |
82 | 82 | ||
83 | this.reloadData() | 83 | this.reloadData() |
84 | }, | 84 | }, |
85 | 85 | ||
86 | err => this.notifier.error(err.message) | 86 | error: err => this.notifier.error(err.message) |
87 | ) | 87 | }) |
88 | } | 88 | } |
89 | 89 | ||
90 | protected reloadData () { | 90 | protected reloadData () { |
91 | this.followService.getFollowers({ pagination: this.pagination, sort: this.sort, search: this.search }) | 91 | this.followService.getFollowers({ pagination: this.pagination, sort: this.sort, search: this.search }) |
92 | .subscribe( | 92 | .subscribe({ |
93 | resultList => { | 93 | next: resultList => { |
94 | this.followers = resultList.data | 94 | this.followers = resultList.data |
95 | this.totalRecords = resultList.total | 95 | this.totalRecords = resultList.total |
96 | }, | 96 | }, |
97 | 97 | ||
98 | err => this.notifier.error(err.message) | 98 | error: err => this.notifier.error(err.message) |
99 | ) | 99 | }) |
100 | } | 100 | } |
101 | } | 101 | } |