aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tools/peertube-auth.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-01-28 11:07:23 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-01-28 11:35:26 +0100
commit26fcf2efebc681104d8e181da42b9ec112a8d28e (patch)
tree1d2a4a5c8c5547659274a765238b6b58839493eb /server/tools/peertube-auth.ts
parentb764380ac23f4e9d4677d08acdc3474c2931a16d (diff)
downloadPeerTube-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.ts7
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'
6import { getNetrc, getSettings, writeSettings } from './cli' 6import { getNetrc, getSettings, writeSettings } from './cli'
7import { isUserUsernameValid } from '../helpers/custom-validators/users' 7import { isUserUsernameValid } from '../helpers/custom-validators/users'
8import { getAccessToken, login } from '../../shared/extra-utils' 8import { getAccessToken, login } from '../../shared/extra-utils'
9 9import * as CliTable3 from 'cli-table3'
10const Table = require('cli-table')
11 10
12async function delInstance (url: string) { 11async 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