]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/extra-utils/users/user-subscriptions.ts
Fix player height on mobile
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / users / user-subscriptions.ts
index 7148fbfca98e00e4fe923bdbb2697b2ab3a55914..6d402c073b0ed55ab350475f5cd131281d7d02ad 100644 (file)
@@ -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
+    }
   })
 }