mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Return an error on invalid count pagination
This commit is contained in:
@@ -11,14 +11,22 @@ function checkBadStartPagination (url: string, path: string, token?: string, que
|
||||
})
|
||||
}
|
||||
|
||||
function checkBadCountPagination (url: string, path: string, token?: string, query = {}) {
|
||||
return makeGetRequest({
|
||||
async function checkBadCountPagination (url: string, path: string, token?: string, query = {}) {
|
||||
await makeGetRequest({
|
||||
url,
|
||||
path,
|
||||
token,
|
||||
query: immutableAssign(query, { count: 'hello' }),
|
||||
statusCodeExpected: 400
|
||||
})
|
||||
|
||||
await makeGetRequest({
|
||||
url,
|
||||
path,
|
||||
token,
|
||||
query: immutableAssign(query, { count: 2000 }),
|
||||
statusCodeExpected: 400
|
||||
})
|
||||
}
|
||||
|
||||
function checkBadSortPagination (url: string, path: string, token?: string, query = {}) {
|
||||
|
||||
Reference in New Issue
Block a user