mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 19:42:24 +02:00
Add videos list filters
This commit is contained in:
parent
57c36b277e
commit
d525fc399a
26 changed files with 835 additions and 271 deletions
|
@ -1,31 +1,32 @@
|
|||
import { makeGetRequest } from './requests'
|
||||
import { immutableAssign } from '..'
|
||||
|
||||
function checkBadStartPagination (url: string, path: string, token?: string) {
|
||||
function checkBadStartPagination (url: string, path: string, token?: string, query = {}) {
|
||||
return makeGetRequest({
|
||||
url,
|
||||
path,
|
||||
token,
|
||||
query: { start: 'hello' },
|
||||
query: immutableAssign(query, { start: 'hello' }),
|
||||
statusCodeExpected: 400
|
||||
})
|
||||
}
|
||||
|
||||
function checkBadCountPagination (url: string, path: string, token?: string) {
|
||||
function checkBadCountPagination (url: string, path: string, token?: string, query = {}) {
|
||||
return makeGetRequest({
|
||||
url,
|
||||
path,
|
||||
token,
|
||||
query: { count: 'hello' },
|
||||
query: immutableAssign(query, { count: 'hello' }),
|
||||
statusCodeExpected: 400
|
||||
})
|
||||
}
|
||||
|
||||
function checkBadSortPagination (url: string, path: string, token?: string) {
|
||||
function checkBadSortPagination (url: string, path: string, token?: string, query = {}) {
|
||||
return makeGetRequest({
|
||||
url,
|
||||
path,
|
||||
token,
|
||||
query: { sort: 'hello' },
|
||||
query: immutableAssign(query, { sort: 'hello' }),
|
||||
statusCodeExpected: 400
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue