aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
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 })