From 7b3909644dd7cb8be1caad537bb40605e5f059d4 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Mon, 27 Jul 2020 17:00:39 +0200 Subject: test search for subscriptions and video-channels --- shared/extra-utils/users/user-subscriptions.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'shared/extra-utils/users') diff --git a/shared/extra-utils/users/user-subscriptions.ts b/shared/extra-utils/users/user-subscriptions.ts index 7148fbfca..6d402c073 100644 --- a/shared/extra-utils/users/user-subscriptions.ts +++ b/shared/extra-utils/users/user-subscriptions.ts @@ -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 + } }) } -- cgit v1.2.3