X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=client%2Fsrc%2Fapp%2Fshared%2Finstance%2Ffollow.service.ts;h=ef4c0958319271c92b51368f4d5fbf8c2f4a0388;hb=97ecddae104f4013d261f0e9645e8b319ff0f1a6;hp=1477a26ae8120d737341629f43763309190965ef;hpb=f5b72c3937c721258c569ee783503adb379c42ab;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/instance/follow.service.ts b/client/src/app/shared/instance/follow.service.ts index 1477a26ae..ef4c09583 100644 --- a/client/src/app/shared/instance/follow.service.ts +++ b/client/src/app/shared/instance/follow.service.ts @@ -2,7 +2,7 @@ import { catchError, map } from 'rxjs/operators' import { HttpClient, HttpParams } from '@angular/common/http' import { Injectable } from '@angular/core' import { Observable } from 'rxjs' -import { ActorFollow, FollowState, ResultList } from '@shared/index' +import { ActivityPubActorType, ActorFollow, FollowState, ResultList } from '@shared/index' import { environment } from '../../../environments/environment' import { RestExtractor, RestPagination, RestService } from '../rest' import { SortMeta } from 'primeng/api' @@ -22,15 +22,17 @@ export class FollowService { pagination: RestPagination, sort: SortMeta, search?: string, + actorType?: ActivityPubActorType, state?: FollowState }): Observable> { - const { pagination, sort, search, state } = options + const { pagination, sort, search, state, actorType } = options let params = new HttpParams() params = this.restService.addRestGetParams(params, pagination, sort) if (search) params = params.append('search', search) if (state) params = params.append('state', state) + if (actorType) params = params.append('actorType', actorType) return this.authHttp.get>(FollowService.BASE_APPLICATION_URL + '/following', { params }) .pipe( @@ -43,15 +45,17 @@ export class FollowService { pagination: RestPagination, sort: SortMeta, search?: string, + actorType?: ActivityPubActorType, state?: FollowState }): Observable> { - const { pagination, sort, search, state } = options + const { pagination, sort, search, state, actorType } = options let params = new HttpParams() params = this.restService.addRestGetParams(params, pagination, sort) if (search) params = params.append('search', search) if (state) params = params.append('state', state) + if (actorType) params = params.append('actorType', actorType) return this.authHttp.get>(FollowService.BASE_APPLICATION_URL + '/followers', { params }) .pipe(