mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 19:42:24 +02:00
Shared utils -> extra-utils
Because they need dev dependencies
This commit is contained in:
parent
4ee7a4c9ac
commit
94565d52bb
131 changed files with 250 additions and 238 deletions
|
@ -1,40 +0,0 @@
|
|||
import { makeGetRequest } from './requests'
|
||||
import { immutableAssign } from '../miscs/miscs'
|
||||
|
||||
function checkBadStartPagination (url: string, path: string, token?: string, query = {}) {
|
||||
return makeGetRequest({
|
||||
url,
|
||||
path,
|
||||
token,
|
||||
query: immutableAssign(query, { start: 'hello' }),
|
||||
statusCodeExpected: 400
|
||||
})
|
||||
}
|
||||
|
||||
function checkBadCountPagination (url: string, path: string, token?: string, query = {}) {
|
||||
return makeGetRequest({
|
||||
url,
|
||||
path,
|
||||
token,
|
||||
query: immutableAssign(query, { count: 'hello' }),
|
||||
statusCodeExpected: 400
|
||||
})
|
||||
}
|
||||
|
||||
function checkBadSortPagination (url: string, path: string, token?: string, query = {}) {
|
||||
return makeGetRequest({
|
||||
url,
|
||||
path,
|
||||
token,
|
||||
query: immutableAssign(query, { sort: 'hello' }),
|
||||
statusCodeExpected: 400
|
||||
})
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export {
|
||||
checkBadStartPagination,
|
||||
checkBadCountPagination,
|
||||
checkBadSortPagination
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue