From d0a0fa429d4651710ed951a3c11af0219e408964 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 13 Jul 2021 11:44:16 +0200 Subject: Adapt CLI to new commands --- server/tools/peertube-auth.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/tools/peertube-auth.ts') diff --git a/server/tools/peertube-auth.ts b/server/tools/peertube-auth.ts index 1934e7986..b9f4ef4f8 100644 --- a/server/tools/peertube-auth.ts +++ b/server/tools/peertube-auth.ts @@ -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) -- cgit v1.2.3