aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tools/peertube-redundancy.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tools/peertube-redundancy.ts')
-rw-r--r--server/tools/peertube-redundancy.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/server/tools/peertube-redundancy.ts b/server/tools/peertube-redundancy.ts
index 5bc80ddb9..4810deee0 100644
--- a/server/tools/peertube-redundancy.ts
+++ b/server/tools/peertube-redundancy.ts
@@ -3,7 +3,7 @@
3import { registerTSPaths } from '../helpers/register-ts-paths' 3import { registerTSPaths } from '../helpers/register-ts-paths'
4registerTSPaths() 4registerTSPaths()
5 5
6import * as program from 'commander' 6import { program, Command } from 'commander'
7import { getAdminTokenOrDie, getServerCredentials } from './cli' 7import { getAdminTokenOrDie, getServerCredentials } from './cli'
8import { VideoRedundanciesTarget, VideoRedundancy } from '@shared/models' 8import { VideoRedundanciesTarget, VideoRedundancy } from '@shared/models'
9import { addVideoRedundancy, listVideoRedundancies, removeVideoRedundancy } from '@shared/extra-utils/server/redundancy' 9import { addVideoRedundancy, listVideoRedundancies, removeVideoRedundancy } from '@shared/extra-utils/server/redundancy'
@@ -14,7 +14,6 @@ import { URL } from 'url'
14import { uniq } from 'lodash' 14import { uniq } from 'lodash'
15 15
16import bytes = require('bytes') 16import bytes = require('bytes')
17import commander = require('commander')
18 17
19program 18program
20 .name('plugins') 19 .name('plugins')
@@ -105,7 +104,7 @@ async function listRedundanciesCLI (target: VideoRedundanciesTarget) {
105 process.exit(0) 104 process.exit(0)
106} 105}
107 106
108async function addRedundancyCLI (options: { video: number }, command: commander.CommanderStatic) { 107async function addRedundancyCLI (options: { video: number }, command: Command) {
109 const { url, username, password } = await getServerCredentials(command) 108 const { url, username, password } = await getServerCredentials(command)
110 const accessToken = await getAdminTokenOrDie(url, username, password) 109 const accessToken = await getAdminTokenOrDie(url, username, password)
111 110
@@ -138,7 +137,7 @@ async function addRedundancyCLI (options: { video: number }, command: commander.
138 } 137 }
139} 138}
140 139
141async function removeRedundancyCLI (options: { video: number }, command: commander.CommanderStatic) { 140async function removeRedundancyCLI (options: { video: number }, command: Command) {
142 const { url, username, password } = await getServerCredentials(command) 141 const { url, username, password } = await getServerCredentials(command)
143 const accessToken = await getAdminTokenOrDie(url, username, password) 142 const accessToken = await getAdminTokenOrDie(url, username, password)
144 143