2021-07-09 04:21:30 -05:00
|
|
|
import { ServerInfo } from '../server/servers'
|
|
|
|
|
|
|
|
function setDefaultVideoChannel (servers: ServerInfo[]) {
|
|
|
|
const tasks: Promise<any>[] = []
|
|
|
|
|
|
|
|
for (const server of servers) {
|
2021-07-13 07:23:01 -05:00
|
|
|
const p = server.usersCommand.getMyInfo()
|
|
|
|
.then(user => { server.videoChannel = user.videoChannels[0] })
|
2021-07-09 04:21:30 -05:00
|
|
|
|
|
|
|
tasks.push(p)
|
|
|
|
}
|
|
|
|
|
|
|
|
return Promise.all(tasks)
|
|
|
|
}
|
|
|
|
|
|
|
|
export {
|
|
|
|
setDefaultVideoChannel
|
|
|
|
}
|