mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
test search for subscriptions and video-channels
This commit is contained in:
@@ -12,7 +12,14 @@ function addUserSubscription (url: string, token: string, targetUri: string, sta
|
||||
})
|
||||
}
|
||||
|
||||
function listUserSubscriptions (url: string, token: string, sort = '-createdAt', statusCodeExpected = 200) {
|
||||
function listUserSubscriptions (parameters: {
|
||||
url: string
|
||||
token: string
|
||||
sort?: string
|
||||
search?: string
|
||||
statusCodeExpected?: number
|
||||
}) {
|
||||
const { url, token, sort = '-createdAt', search, statusCodeExpected = 200 } = parameters
|
||||
const path = '/api/v1/users/me/subscriptions'
|
||||
|
||||
return makeGetRequest({
|
||||
@@ -20,7 +27,10 @@ function listUserSubscriptions (url: string, token: string, sort = '-createdAt',
|
||||
path,
|
||||
token,
|
||||
statusCodeExpected,
|
||||
query: { sort }
|
||||
query: {
|
||||
sort,
|
||||
search
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -32,8 +32,9 @@ function getAccountVideoChannelsList (parameters: {
|
||||
sort?: string
|
||||
specialStatus?: number
|
||||
withStats?: boolean
|
||||
search?: string
|
||||
}) {
|
||||
const { url, accountName, start, count, sort = 'createdAt', specialStatus = 200, withStats = false } = parameters
|
||||
const { url, accountName, start, count, sort = 'createdAt', specialStatus = 200, withStats = false, search } = parameters
|
||||
|
||||
const path = '/api/v1/accounts/' + accountName + '/video-channels'
|
||||
|
||||
@@ -44,7 +45,8 @@ function getAccountVideoChannelsList (parameters: {
|
||||
start,
|
||||
count,
|
||||
sort,
|
||||
withStats
|
||||
withStats,
|
||||
search
|
||||
},
|
||||
statusCodeExpected: specialStatus
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user