diff options
Diffstat (limited to 'server/tools/peertube-auth.ts')
-rw-r--r-- | server/tools/peertube-auth.ts | 6 |
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 | ||
6 | import { OptionValues, program } from 'commander' | 6 | import { OptionValues, program } from 'commander' |
7 | import * as prompt from 'prompt' | 7 | import * as prompt from 'prompt' |
8 | import { getNetrc, getSettings, writeSettings } from './cli' | 8 | import { assignToken, buildServer, getNetrc, getSettings, writeSettings } from './cli' |
9 | import { isUserUsernameValid } from '../helpers/custom-validators/users' | 9 | import { isUserUsernameValid } from '../helpers/custom-validators/users' |
10 | import { getAccessToken } from '../../shared/extra-utils' | ||
11 | import * as CliTable3 from 'cli-table3' | 10 | import * as CliTable3 from 'cli-table3' |
12 | 11 | ||
13 | async function delInstance (url: string) { | 12 | async 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) |