diff options
author | Chocobozzz <me@florianbigard.com> | 2020-01-28 11:07:23 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-01-28 11:35:26 +0100 |
commit | 26fcf2efebc681104d8e181da42b9ec112a8d28e (patch) | |
tree | 1d2a4a5c8c5547659274a765238b6b58839493eb /server/tools/peertube-auth.ts | |
parent | b764380ac23f4e9d4677d08acdc3474c2931a16d (diff) | |
download | PeerTube-26fcf2efebc681104d8e181da42b9ec112a8d28e.tar.gz PeerTube-26fcf2efebc681104d8e181da42b9ec112a8d28e.tar.zst PeerTube-26fcf2efebc681104d8e181da42b9ec112a8d28e.zip |
Add redundancy CLI
Diffstat (limited to 'server/tools/peertube-auth.ts')
-rw-r--r-- | server/tools/peertube-auth.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/server/tools/peertube-auth.ts b/server/tools/peertube-auth.ts index 6597a5c36..acac75034 100644 --- a/server/tools/peertube-auth.ts +++ b/server/tools/peertube-auth.ts | |||
@@ -6,8 +6,7 @@ import * as prompt from 'prompt' | |||
6 | import { getNetrc, getSettings, writeSettings } from './cli' | 6 | import { getNetrc, getSettings, writeSettings } from './cli' |
7 | import { isUserUsernameValid } from '../helpers/custom-validators/users' | 7 | import { isUserUsernameValid } from '../helpers/custom-validators/users' |
8 | import { getAccessToken, login } from '../../shared/extra-utils' | 8 | import { getAccessToken, login } from '../../shared/extra-utils' |
9 | 9 | import * as CliTable3 from 'cli-table3' | |
10 | const Table = require('cli-table') | ||
11 | 10 | ||
12 | async function delInstance (url: string) { | 11 | async function delInstance (url: string) { |
13 | const [ settings, netrc ] = await Promise.all([ getSettings(), getNetrc() ]) | 12 | const [ settings, netrc ] = await Promise.all([ getSettings(), getNetrc() ]) |
@@ -108,10 +107,10 @@ program | |||
108 | .action(async () => { | 107 | .action(async () => { |
109 | const [ settings, netrc ] = await Promise.all([ getSettings(), getNetrc() ]) | 108 | const [ settings, netrc ] = await Promise.all([ getSettings(), getNetrc() ]) |
110 | 109 | ||
111 | const table = new Table({ | 110 | const table = new CliTable3({ |
112 | head: ['instance', 'login'], | 111 | head: ['instance', 'login'], |
113 | colWidths: [30, 30] | 112 | colWidths: [30, 30] |
114 | }) | 113 | }) as CliTable3.HorizontalTable |
115 | 114 | ||
116 | settings.remotes.forEach(element => { | 115 | settings.remotes.forEach(element => { |
117 | if (!netrc.machines[element]) return | 116 | if (!netrc.machines[element]) return |