accounts.ts 389 B

123456789101112131415
  1. import { PeerTubeServer } from '../server/server'
  2. async function setDefaultAccountAvatar (serversArg: PeerTubeServer | PeerTubeServer[], token?: string) {
  3. const servers = Array.isArray(serversArg)
  4. ? serversArg
  5. : [ serversArg ]
  6. for (const server of servers) {
  7. await server.users.updateMyAvatar({ fixture: 'avatar.png', token })
  8. }
  9. }
  10. export {
  11. setDefaultAccountAvatar
  12. }