aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-06-20 10:23:19 +0200
committerChocobozzz <me@florianbigard.com>2022-06-20 10:23:19 +0200
commit714e33a7428b71ef98129ce85a4bd64140bcd912 (patch)
tree59bd3e4b359bcd04f4ad97c404246688ccd84e68 /shared
parentaa2ce188d102ab38452df316d06286040b5d9075 (diff)
parentd47b18079bfe4aed472ddcc0a89302ba85f03a48 (diff)
downloadPeerTube-714e33a7428b71ef98129ce85a4bd64140bcd912.tar.gz
PeerTube-714e33a7428b71ef98129ce85a4bd64140bcd912.tar.zst
PeerTube-714e33a7428b71ef98129ce85a4bd64140bcd912.zip
Merge branch 'release/4.2.0' into develop
Diffstat (limited to 'shared')
-rw-r--r--shared/server-commands/users/blocklist-command.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/shared/server-commands/users/blocklist-command.ts b/shared/server-commands/users/blocklist-command.ts
index 2e7ed074d..862d8945e 100644
--- a/shared/server-commands/users/blocklist-command.ts
+++ b/shared/server-commands/users/blocklist-command.ts
@@ -6,7 +6,10 @@ import { AbstractCommand, OverrideCommandOptions } from '../shared'
6type ListBlocklistOptions = OverrideCommandOptions & { 6type ListBlocklistOptions = OverrideCommandOptions & {
7 start: number 7 start: number
8 count: number 8 count: number
9 sort: string // default -createdAt 9
10 sort?: string // default -createdAt
11
12 search?: string
10} 13}
11 14
12export class BlocklistCommand extends AbstractCommand { 15export class BlocklistCommand extends AbstractCommand {
@@ -147,13 +150,13 @@ export class BlocklistCommand extends AbstractCommand {
147 } 150 }
148 151
149 private listBlocklist <T> (options: ListBlocklistOptions, path: string) { 152 private listBlocklist <T> (options: ListBlocklistOptions, path: string) {
150 const { start, count, sort = '-createdAt' } = options 153 const { start, count, search, sort = '-createdAt' } = options
151 154
152 return this.getRequestBody<ResultList<T>>({ 155 return this.getRequestBody<ResultList<T>>({
153 ...options, 156 ...options,
154 157
155 path, 158 path,
156 query: { start, count, sort }, 159 query: { start, count, sort, search },
157 implicitToken: true, 160 implicitToken: true,
158 defaultExpectedStatus: HttpStatusCode.OK_200 161 defaultExpectedStatus: HttpStatusCode.OK_200
159 }) 162 })