aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-moderation
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-07-27 13:44:40 +0200
committerChocobozzz <me@florianbigard.com>2022-07-27 13:52:13 +0200
commite3d6c6434f570f77c0532f86c82f78bcafb399ec (patch)
tree65d525f42c8cf55aba871093b3dd65964f5cd967 /client/src/app/shared/shared-moderation
parent073deef8862f462de5f159a57877ef415ebe4c69 (diff)
downloadPeerTube-e3d6c6434f570f77c0532f86c82f78bcafb399ec.tar.gz
PeerTube-e3d6c6434f570f77c0532f86c82f78bcafb399ec.tar.zst
PeerTube-e3d6c6434f570f77c0532f86c82f78bcafb399ec.zip
Add bulk action on following/followers
Diffstat (limited to 'client/src/app/shared/shared-moderation')
-rw-r--r--client/src/app/shared/shared-moderation/blocklist.service.ts3
-rw-r--r--client/src/app/shared/shared-moderation/video-block.service.ts3
2 files changed, 4 insertions, 2 deletions
diff --git a/client/src/app/shared/shared-moderation/blocklist.service.ts b/client/src/app/shared/shared-moderation/blocklist.service.ts
index 3e92c2831..1169bf757 100644
--- a/client/src/app/shared/shared-moderation/blocklist.service.ts
+++ b/client/src/app/shared/shared-moderation/blocklist.service.ts
@@ -4,6 +4,7 @@ import { catchError, concatMap, map, 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'
7import { arrayify } from '@shared/core-utils'
7import { AccountBlock as AccountBlockServer, BlockStatus, ResultList, ServerBlock } from '@shared/models' 8import { AccountBlock as AccountBlockServer, BlockStatus, ResultList, ServerBlock } from '@shared/models'
8import { environment } from '../../../environments/environment' 9import { environment } from '../../../environments/environment'
9import { Account } from '../shared-main' 10import { Account } from '../shared-main'
@@ -122,7 +123,7 @@ export class BlocklistService {
122 } 123 }
123 124
124 blockAccountByInstance (accountsArg: Pick<Account, 'nameWithHost'> | Pick<Account, 'nameWithHost'>[]) { 125 blockAccountByInstance (accountsArg: Pick<Account, 'nameWithHost'> | Pick<Account, 'nameWithHost'>[]) {
125 const accounts = Array.isArray(accountsArg) ? accountsArg : [ accountsArg ] 126 const accounts = arrayify(accountsArg)
126 127
127 return from(accounts) 128 return from(accounts)
128 .pipe( 129 .pipe(
diff --git a/client/src/app/shared/shared-moderation/video-block.service.ts b/client/src/app/shared/shared-moderation/video-block.service.ts
index 5dfb0d7d4..6272b672f 100644
--- a/client/src/app/shared/shared-moderation/video-block.service.ts
+++ b/client/src/app/shared/shared-moderation/video-block.service.ts
@@ -4,6 +4,7 @@ import { catchError, concatMap, map, 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'
7import { arrayify } from '@shared/core-utils'
7import { ResultList, VideoBlacklist, VideoBlacklistType } from '@shared/models' 8import { ResultList, VideoBlacklist, VideoBlacklistType } from '@shared/models'
8import { environment } from '../../../environments/environment' 9import { environment } from '../../../environments/environment'
9 10
@@ -53,7 +54,7 @@ export class VideoBlockService {
53 } 54 }
54 55
55 unblockVideo (videoIdArgs: number | number[]) { 56 unblockVideo (videoIdArgs: number | number[]) {
56 const videoIds = Array.isArray(videoIdArgs) ? videoIdArgs : [ videoIdArgs ] 57 const videoIds = arrayify(videoIdArgs)
57 58
58 return observableFrom(videoIds) 59 return observableFrom(videoIds)
59 .pipe( 60 .pipe(