aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/server-commands/users
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-06-17 16:06:58 +0200
committerChocobozzz <me@florianbigard.com>2022-06-17 16:06:58 +0200
commitd3976db269a0e5a3256867a7fc614d3c54c58720 (patch)
treec6cccee493ff773ef18195fba12c6843349f8b80 /shared/server-commands/users
parentba73bedda6ad72b0accd51e594b1b3e193d50e87 (diff)
downloadPeerTube-d3976db269a0e5a3256867a7fc614d3c54c58720.tar.gz
PeerTube-d3976db269a0e5a3256867a7fc614d3c54c58720.tar.zst
PeerTube-d3976db269a0e5a3256867a7fc614d3c54c58720.zip
Fix searching in blocklist
Diffstat (limited to 'shared/server-commands/users')
-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 })