aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/follows/shared/follow.service.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+admin/follows/shared/follow.service.ts')
-rw-r--r--client/src/app/+admin/follows/shared/follow.service.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/client/src/app/+admin/follows/shared/follow.service.ts b/client/src/app/+admin/follows/shared/follow.service.ts
index 87ea5fb0c..27169a9cd 100644
--- a/client/src/app/+admin/follows/shared/follow.service.ts
+++ b/client/src/app/+admin/follows/shared/follow.service.ts
@@ -3,7 +3,7 @@ import { HttpClient, HttpParams } from '@angular/common/http'
3import { Injectable } from '@angular/core' 3import { Injectable } from '@angular/core'
4import { SortMeta } from 'primeng/primeng' 4import { SortMeta } from 'primeng/primeng'
5import { Observable } from 'rxjs' 5import { Observable } from 'rxjs'
6import { AccountFollow, ResultList } from '../../../../../../shared' 6import { ActorFollow, ResultList } from '../../../../../../shared'
7import { environment } from '../../../../environments/environment' 7import { environment } from '../../../../environments/environment'
8import { RestExtractor, RestPagination, RestService } from '../../../shared' 8import { RestExtractor, RestPagination, RestService } from '../../../shared'
9 9
@@ -18,22 +18,22 @@ export class FollowService {
18 ) { 18 ) {
19 } 19 }
20 20
21 getFollowing (pagination: RestPagination, sort: SortMeta): Observable<ResultList<AccountFollow>> { 21 getFollowing (pagination: RestPagination, sort: SortMeta): Observable<ResultList<ActorFollow>> {
22 let params = new HttpParams() 22 let params = new HttpParams()
23 params = this.restService.addRestGetParams(params, pagination, sort) 23 params = this.restService.addRestGetParams(params, pagination, sort)
24 24
25 return this.authHttp.get<ResultList<AccountFollow>>(FollowService.BASE_APPLICATION_URL + '/following', { params }) 25 return this.authHttp.get<ResultList<ActorFollow>>(FollowService.BASE_APPLICATION_URL + '/following', { params })
26 .pipe( 26 .pipe(
27 map(res => this.restExtractor.convertResultListDateToHuman(res)), 27 map(res => this.restExtractor.convertResultListDateToHuman(res)),
28 catchError(res => this.restExtractor.handleError(res)) 28 catchError(res => this.restExtractor.handleError(res))
29 ) 29 )
30 } 30 }
31 31
32 getFollowers (pagination: RestPagination, sort: SortMeta): Observable<ResultList<AccountFollow>> { 32 getFollowers (pagination: RestPagination, sort: SortMeta): Observable<ResultList<ActorFollow>> {
33 let params = new HttpParams() 33 let params = new HttpParams()
34 params = this.restService.addRestGetParams(params, pagination, sort) 34 params = this.restService.addRestGetParams(params, pagination, sort)
35 35
36 return this.authHttp.get<ResultList<AccountFollow>>(FollowService.BASE_APPLICATION_URL + '/followers', { params }) 36 return this.authHttp.get<ResultList<ActorFollow>>(FollowService.BASE_APPLICATION_URL + '/followers', { params })
37 .pipe( 37 .pipe(
38 map(res => this.restExtractor.convertResultListDateToHuman(res)), 38 map(res => this.restExtractor.convertResultListDateToHuman(res)),
39 catchError(res => this.restExtractor.handleError(res)) 39 catchError(res => this.restExtractor.handleError(res))
@@ -52,7 +52,7 @@ export class FollowService {
52 ) 52 )
53 } 53 }
54 54
55 unfollow (follow: AccountFollow) { 55 unfollow (follow: ActorFollow) {
56 return this.authHttp.delete(FollowService.BASE_APPLICATION_URL + '/following/' + follow.following.host) 56 return this.authHttp.delete(FollowService.BASE_APPLICATION_URL + '/following/' + follow.following.host)
57 .pipe( 57 .pipe(
58 map(this.restExtractor.extractDataBool), 58 map(this.restExtractor.extractDataBool),