1
0
Fork 0
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:
Chocobozzz 2022-06-17 16:06:58 +02:00
parent ba73bedda6
commit d3976db269
No known key found for this signature in database
GPG key ID: 583A612D890159BE
3 changed files with 48 additions and 3 deletions

View file

@ -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
})