aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/server-commands/users/accounts.ts
blob: 6387891f410ead8c05c0fa99d3046066b76e4c1e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { PeerTubeServer } from '../server/server'

async function setDefaultAccountAvatar (serversArg: PeerTubeServer | PeerTubeServer[], token?: string) {
  const servers = Array.isArray(serversArg)
    ? serversArg
    : [ serversArg ]

  for (const server of servers) {
    await server.users.updateMyAvatar({ fixture: 'avatar.png', token })
  }
}

export {
  setDefaultAccountAvatar
}