1
0
Fork 0
peertube/shared/server-commands/videos/channels.ts
2021-12-17 09:29:23 +01:00

18 lines
383 B
TypeScript

import { PeerTubeServer } from '../server/server'
function setDefaultVideoChannel (servers: PeerTubeServer[]) {
const tasks: Promise<any>[] = []
for (const server of servers) {
const p = server.users.getMyInfo()
.then(user => { server.store.channel = user.videoChannels[0] })
tasks.push(p)
}
return Promise.all(tasks)
}
export {
setDefaultVideoChannel
}