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

19 lines
473 B
TypeScript

import { PeerTubeServer } from '../server/server'
function setAccessTokensToServers (servers: PeerTubeServer[]) {
const tasks: Promise<any>[] = []
for (const server of servers) {
const p = server.login.getAccessToken()
.then(t => { server.accessToken = t })
tasks.push(p)
}
return Promise.all(tasks)
}
// ---------------------------------------------------------------------------
export {
setAccessTokensToServers
}