]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-moderation/blocklist.service.ts
Refactoring margin and padding mixins
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-moderation / blocklist.service.ts
index 1169bf75780a58c3e9c69afb4b2fdeab68dda520..0fb7536e57266b4ebb2a18df2566caae439ccc88 100644 (file)
@@ -53,7 +53,6 @@ export class BlocklistService {
 
     return this.authHttp.get<ResultList<AccountBlock>>(BlocklistService.BASE_USER_BLOCKLIST_URL + '/accounts', { params })
                .pipe(
-                 map(res => this.restExtractor.convertResultListDateToHuman(res)),
                  map(res => this.restExtractor.applyToResultListData(res, this.formatAccountBlock.bind(this))),
                  catchError(err => this.restExtractor.handleError(err))
                )
@@ -84,10 +83,7 @@ export class BlocklistService {
     if (search) params = params.append('search', search)
 
     return this.authHttp.get<ResultList<ServerBlock>>(BlocklistService.BASE_USER_BLOCKLIST_URL + '/servers', { params })
-               .pipe(
-                 map(res => this.restExtractor.convertResultListDateToHuman(res)),
-                 catchError(err => this.restExtractor.handleError(err))
-               )
+               .pipe(catchError(err => this.restExtractor.handleError(err)))
   }
 
   blockServerByUser (host: string) {
@@ -116,7 +112,6 @@ export class BlocklistService {
 
     return this.authHttp.get<ResultList<AccountBlock>>(BlocklistService.BASE_SERVER_BLOCKLIST_URL + '/accounts', { params })
                .pipe(
-                 map(res => this.restExtractor.convertResultListDateToHuman(res)),
                  map(res => this.restExtractor.applyToResultListData(res, this.formatAccountBlock.bind(this))),
                  catchError(err => this.restExtractor.handleError(err))
                )
@@ -151,10 +146,7 @@ export class BlocklistService {
     if (search) params = params.append('search', search)
 
     return this.authHttp.get<ResultList<ServerBlock>>(BlocklistService.BASE_SERVER_BLOCKLIST_URL + '/servers', { params })
-               .pipe(
-                 map(res => this.restExtractor.convertResultListDateToHuman(res)),
-                 catchError(err => this.restExtractor.handleError(err))
-               )
+               .pipe(catchError(err => this.restExtractor.handleError(err)))
   }
 
   blockServerByInstance (host: string) {