aboutsummaryrefslogtreecommitdiffhomepage
path: root/packages/server-commands/src/users/accounts.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/server-commands/src/users/accounts.ts')
-rw-r--r--packages/server-commands/src/users/accounts.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/server-commands/src/users/accounts.ts b/packages/server-commands/src/users/accounts.ts
new file mode 100644
index 000000000..3b8b9d36a
--- /dev/null
+++ b/packages/server-commands/src/users/accounts.ts
@@ -0,0 +1,15 @@
1import { PeerTubeServer } from '../server/server.js'
2
3async function setDefaultAccountAvatar (serversArg: PeerTubeServer | PeerTubeServer[], token?: string) {
4 const servers = Array.isArray(serversArg)
5 ? serversArg
6 : [ serversArg ]
7
8 for (const server of servers) {
9 await server.users.updateMyAvatar({ fixture: 'avatar.png', token })
10 }
11}
12
13export {
14 setDefaultAccountAvatar
15}