]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/extra-utils/videos/channels.ts
Add bin directory creation for parallel tests
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / videos / channels.ts
index a77543c92e2c91e04c3207d5727cdafdc6038d0b..756c47453fef4ac4893193ef3d469141bf64d2ac 100644 (file)
@@ -1,13 +1,11 @@
-import { User } from '../../models/users/user.model'
-import { ServerInfo } from '../server/servers'
-import { getMyUserInformation } from '../users/users'
+import { PeerTubeServer } from '../server/server'
 
-function setDefaultVideoChannel (servers: ServerInfo[]) {
+function setDefaultVideoChannel (servers: PeerTubeServer[]) {
   const tasks: Promise<any>[] = []
 
   for (const server of servers) {
-    const p = getMyUserInformation(server.url, server.accessToken)
-      .then(res => { server.videoChannel = (res.body as User).videoChannels[0] })
+    const p = server.users.getMyInfo()
+      .then(user => { server.store.channel = user.videoChannels[0] })
 
     tasks.push(p)
   }