PeerTube/shared/server-commands/users/accounts.ts

16 lines
389 B
TypeScript

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
}