mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Fix searching in blocklist
This commit is contained in:
@@ -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
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user