aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-instance/instance-follow.service.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-instance/instance-follow.service.ts')
-rw-r--r--client/src/app/shared/shared-instance/instance-follow.service.ts12
1 files changed, 3 insertions, 9 deletions
diff --git a/client/src/app/shared/shared-instance/instance-follow.service.ts b/client/src/app/shared/shared-instance/instance-follow.service.ts
index 5366fd068..7568fbbf4 100644
--- a/client/src/app/shared/shared-instance/instance-follow.service.ts
+++ b/client/src/app/shared/shared-instance/instance-follow.service.ts
@@ -1,6 +1,6 @@
1import { SortMeta } from 'primeng/api' 1import { SortMeta } from 'primeng/api'
2import { from, Observable } from 'rxjs' 2import { from, Observable } from 'rxjs'
3import { catchError, concatMap, map, toArray } from 'rxjs/operators' 3import { catchError, concatMap, toArray } from 'rxjs/operators'
4import { HttpClient, HttpParams } from '@angular/common/http' 4import { HttpClient, HttpParams } from '@angular/common/http'
5import { Injectable } from '@angular/core' 5import { Injectable } from '@angular/core'
6import { RestExtractor, RestPagination, RestService } from '@app/core' 6import { RestExtractor, RestPagination, RestService } from '@app/core'
@@ -40,10 +40,7 @@ export class InstanceFollowService {
40 if (actorType) params = params.append('actorType', actorType) 40 if (actorType) params = params.append('actorType', actorType)
41 41
42 return this.authHttp.get<ResultList<ActorFollow>>(InstanceFollowService.BASE_APPLICATION_URL + '/following', { params }) 42 return this.authHttp.get<ResultList<ActorFollow>>(InstanceFollowService.BASE_APPLICATION_URL + '/following', { params })
43 .pipe( 43 .pipe(catchError(res => this.restExtractor.handleError(res)))
44 map(res => this.restExtractor.convertResultListDateToHuman(res)),
45 catchError(res => this.restExtractor.handleError(res))
46 )
47 } 44 }
48 45
49 getFollowers (options: { 46 getFollowers (options: {
@@ -66,10 +63,7 @@ export class InstanceFollowService {
66 if (actorType) params = params.append('actorType', actorType) 63 if (actorType) params = params.append('actorType', actorType)
67 64
68 return this.authHttp.get<ResultList<ActorFollow>>(InstanceFollowService.BASE_APPLICATION_URL + '/followers', { params }) 65 return this.authHttp.get<ResultList<ActorFollow>>(InstanceFollowService.BASE_APPLICATION_URL + '/followers', { params })
69 .pipe( 66 .pipe(catchError(res => this.restExtractor.handleError(res)))
70 map(res => this.restExtractor.convertResultListDateToHuman(res)),
71 catchError(res => this.restExtractor.handleError(res))
72 )
73 } 67 }
74 68
75 follow (hostsOrHandles: string[]) { 69 follow (hostsOrHandles: string[]) {