1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Fix broken dates with localized pages

This commit is contained in:
Chocobozzz 2022-09-16 10:33:26 +02:00
parent 56162c6a06
commit 3afe0ec3b3
No known key found for this signature in database
GPG key ID: 583A612D890159BE
6 changed files with 9 additions and 31 deletions

View file

@ -1,6 +1,6 @@
import { SortMeta } from 'primeng/api'
import { from, Observable } from 'rxjs'
import { catchError, concatMap, map, toArray } from 'rxjs/operators'
import { catchError, concatMap, toArray } from 'rxjs/operators'
import { HttpClient, HttpParams } from '@angular/common/http'
import { Injectable } from '@angular/core'
import { RestExtractor, RestPagination, RestService } from '@app/core'
@ -40,10 +40,7 @@ export class InstanceFollowService {
if (actorType) params = params.append('actorType', actorType)
return this.authHttp.get<ResultList<ActorFollow>>(InstanceFollowService.BASE_APPLICATION_URL + '/following', { params })
.pipe(
map(res => this.restExtractor.convertResultListDateToHuman(res)),
catchError(res => this.restExtractor.handleError(res))
)
.pipe(catchError(res => this.restExtractor.handleError(res)))
}
getFollowers (options: {
@ -66,10 +63,7 @@ export class InstanceFollowService {
if (actorType) params = params.append('actorType', actorType)
return this.authHttp.get<ResultList<ActorFollow>>(InstanceFollowService.BASE_APPLICATION_URL + '/followers', { params })
.pipe(
map(res => this.restExtractor.convertResultListDateToHuman(res)),
catchError(res => this.restExtractor.handleError(res))
)
.pipe(catchError(res => this.restExtractor.handleError(res)))
}
follow (hostsOrHandles: string[]) {