diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-21 15:51:30 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-21 15:51:30 +0200 |
commit | a24bd1ed41b43790bab6ba789580bb4e85f07d85 (patch) | |
tree | a54b0f6c921ba83a6e909cd0ced325b2d4b8863c /server/tools/peertube-auth.ts | |
parent | 5f26f13b3c16ac5ae0a3b0a7142d84a9528cf565 (diff) | |
parent | c63830f15403ac4e750829f27d8bbbdc9a59282c (diff) | |
download | PeerTube-a24bd1ed41b43790bab6ba789580bb4e85f07d85.tar.gz PeerTube-a24bd1ed41b43790bab6ba789580bb4e85f07d85.tar.zst PeerTube-a24bd1ed41b43790bab6ba789580bb4e85f07d85.zip |
Merge branch 'next' into develop
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) |