aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tools/peertube-auth.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tools/peertube-auth.ts')
-rw-r--r--server/tools/peertube-auth.ts6
1 files changed, 3 insertions, 3 deletions
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()
5 5
6import { OptionValues, program } from 'commander' 6import { OptionValues, program } from 'commander'
7import * as prompt from 'prompt' 7import * as prompt from 'prompt'
8import { getNetrc, getSettings, writeSettings } from './cli' 8import { assignToken, buildServer, getNetrc, getSettings, writeSettings } from './cli'
9import { isUserUsernameValid } from '../helpers/custom-validators/users' 9import { isUserUsernameValid } from '../helpers/custom-validators/users'
10import { getAccessToken } from '../../shared/extra-utils'
11import * as CliTable3 from 'cli-table3' 10import * as CliTable3 from 'cli-table3'
12 11
13async function delInstance (url: string) { 12async function delInstance (url: string) {
@@ -97,7 +96,8 @@ program
97 // @see https://github.com/Chocobozzz/PeerTube/issues/3520 96 // @see https://github.com/Chocobozzz/PeerTube/issues/3520
98 result.url = stripExtraneousFromPeerTubeUrl(result.url) 97 result.url = stripExtraneousFromPeerTubeUrl(result.url)
99 98
100 await getAccessToken(result.url, result.username, result.password) 99 const server = buildServer(result.url)
100 await assignToken(server, result.username, result.password)
101 } catch (err) { 101 } catch (err) {
102 console.error(err.message) 102 console.error(err.message)
103 process.exit(-1) 103 process.exit(-1)