mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
Fix searching in blocklist
This commit is contained in:
parent
ba73bedda6
commit
d3976db269
3 changed files with 48 additions and 3 deletions
|
@ -6,7 +6,10 @@ import { AbstractCommand, OverrideCommandOptions } from '../shared'
|
|||
type ListBlocklistOptions = OverrideCommandOptions & {
|
||||
start: number
|
||||
count: number
|
||||
sort: string // default -createdAt
|
||||
|
||||
sort?: string // default -createdAt
|
||||
|
||||
search?: string
|
||||
}
|
||||
|
||||
export class BlocklistCommand extends AbstractCommand {
|
||||
|
@ -147,13 +150,13 @@ export class BlocklistCommand extends AbstractCommand {
|
|||
}
|
||||
|
||||
private listBlocklist <T> (options: ListBlocklistOptions, path: string) {
|
||||
const { start, count, sort = '-createdAt' } = options
|
||||
const { start, count, search, sort = '-createdAt' } = options
|
||||
|
||||
return this.getRequestBody<ResultList<T>>({
|
||||
...options,
|
||||
|
||||
path,
|
||||
query: { start, count, sort },
|
||||
query: { start, count, sort, search },
|
||||
implicitToken: true,
|
||||
defaultExpectedStatus: HttpStatusCode.OK_200
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue