aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/follows/following-add/following-add.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+admin/follows/following-add/following-add.component.ts')
-rw-r--r--client/src/app/+admin/follows/following-add/following-add.component.ts21
1 files changed, 9 insertions, 12 deletions
diff --git a/client/src/app/+admin/follows/following-add/following-add.component.ts b/client/src/app/+admin/follows/following-add/following-add.component.ts
index bf842129d..c296c8852 100644
--- a/client/src/app/+admin/follows/following-add/following-add.component.ts
+++ b/client/src/app/+admin/follows/following-add/following-add.component.ts
@@ -43,7 +43,7 @@ export class FollowingAddComponent {
43 } 43 }
44 } 44 }
45 45
46 addFollowing () { 46 async addFollowing () {
47 this.error = '' 47 this.error = ''
48 48
49 const hosts = this.getNotEmptyHosts() 49 const hosts = this.getNotEmptyHosts()
@@ -57,20 +57,17 @@ export class FollowingAddComponent {
57 } 57 }
58 58
59 const confirmMessage = 'If you confirm, you will send a follow request to:<br /> - ' + hosts.join('<br /> - ') 59 const confirmMessage = 'If you confirm, you will send a follow request to:<br /> - ' + hosts.join('<br /> - ')
60 this.confirmService.confirm(confirmMessage, 'Follow new server(s)').subscribe( 60 const res = await this.confirmService.confirm(confirmMessage, 'Follow new server(s)')
61 res => { 61 if (res === false) return
62 if (res === false) return
63 62
64 this.followService.follow(hosts).subscribe( 63 this.followService.follow(hosts).subscribe(
65 status => { 64 () => {
66 this.notificationsService.success('Success', 'Follow request(s) sent!') 65 this.notificationsService.success('Success', 'Follow request(s) sent!')
67 66
68 setTimeout(() => this.router.navigate([ '/admin/follows/following-list' ]), 500) 67 setTimeout(() => this.router.navigate([ '/admin/follows/following-list' ]), 500)
69 }, 68 },
70 69
71 err => this.notificationsService.error('Error', err.message) 70 err => this.notificationsService.error('Error', err.message)
72 )
73 }
74 ) 71 )
75 } 72 }
76 73