diff options
-rw-r--r-- | server/tools/cli.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/tools/cli.ts b/server/tools/cli.ts index a15d73fb4..4607d052a 100644 --- a/server/tools/cli.ts +++ b/server/tools/cli.ts | |||
@@ -20,7 +20,7 @@ async function getAdminTokenOrDie (server: PeerTubeServer, username: string, pas | |||
20 | const token = await server.login.getAccessToken(username, password) | 20 | const token = await server.login.getAccessToken(username, password) |
21 | const me = await server.users.getMyInfo({ token }) | 21 | const me = await server.users.getMyInfo({ token }) |
22 | 22 | ||
23 | if (me.role !== UserRole.ADMINISTRATOR) { | 23 | if (me.role.id !== UserRole.ADMINISTRATOR) { |
24 | console.error('You must be an administrator.') | 24 | console.error('You must be an administrator.') |
25 | process.exit(-1) | 25 | process.exit(-1) |
26 | } | 26 | } |