mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 19:42:24 +02:00
Adapt CLI to new commands
This commit is contained in:
parent
41d1d07501
commit
d0a0fa429d
8 changed files with 55 additions and 52 deletions
|
@ -5,9 +5,8 @@ registerTSPaths()
|
|||
|
||||
import { OptionValues, program } from 'commander'
|
||||
import * as prompt from 'prompt'
|
||||
import { getNetrc, getSettings, writeSettings } from './cli'
|
||||
import { assignToken, buildServer, getNetrc, getSettings, writeSettings } from './cli'
|
||||
import { isUserUsernameValid } from '../helpers/custom-validators/users'
|
||||
import { getAccessToken } from '../../shared/extra-utils'
|
||||
import * as CliTable3 from 'cli-table3'
|
||||
|
||||
async function delInstance (url: string) {
|
||||
|
@ -97,7 +96,8 @@ program
|
|||
// @see https://github.com/Chocobozzz/PeerTube/issues/3520
|
||||
result.url = stripExtraneousFromPeerTubeUrl(result.url)
|
||||
|
||||
await getAccessToken(result.url, result.username, result.password)
|
||||
const server = buildServer(result.url)
|
||||
await assignToken(server, result.username, result.password)
|
||||
} catch (err) {
|
||||
console.error(err.message)
|
||||
process.exit(-1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue