diff options
Diffstat (limited to 'client/src/app/shared/shared-moderation')
-rw-r--r-- | client/src/app/shared/shared-moderation/blocklist.service.ts | 3 | ||||
-rw-r--r-- | client/src/app/shared/shared-moderation/video-block.service.ts | 3 |
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' | |||
4 | import { HttpClient, HttpParams } from '@angular/common/http' | 4 | import { HttpClient, HttpParams } from '@angular/common/http' |
5 | import { Injectable } from '@angular/core' | 5 | import { Injectable } from '@angular/core' |
6 | import { RestExtractor, RestPagination, RestService } from '@app/core' | 6 | import { RestExtractor, RestPagination, RestService } from '@app/core' |
7 | import { arrayify } from '@shared/core-utils' | ||
7 | import { AccountBlock as AccountBlockServer, BlockStatus, ResultList, ServerBlock } from '@shared/models' | 8 | import { AccountBlock as AccountBlockServer, BlockStatus, ResultList, ServerBlock } from '@shared/models' |
8 | import { environment } from '../../../environments/environment' | 9 | import { environment } from '../../../environments/environment' |
9 | import { Account } from '../shared-main' | 10 | import { 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' | |||
4 | import { HttpClient, HttpParams } from '@angular/common/http' | 4 | import { HttpClient, HttpParams } from '@angular/common/http' |
5 | import { Injectable } from '@angular/core' | 5 | import { Injectable } from '@angular/core' |
6 | import { RestExtractor, RestPagination, RestService } from '@app/core' | 6 | import { RestExtractor, RestPagination, RestService } from '@app/core' |
7 | import { arrayify } from '@shared/core-utils' | ||
7 | import { ResultList, VideoBlacklist, VideoBlacklistType } from '@shared/models' | 8 | import { ResultList, VideoBlacklist, VideoBlacklistType } from '@shared/models' |
8 | import { environment } from '../../../environments/environment' | 9 | import { 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( |