diff options
author | John Livingston <git@john-livingston.fr> | 2018-05-11 11:26:50 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-05-11 15:23:50 +0200 |
commit | 8a2db2e8cb67f7f802ecb35be7b9154695f1a6ec (patch) | |
tree | 21a221f8ed79c70d162a841f5eda1ed05c176133 /server | |
parent | 7eb5f8cd32d507604584231cb78c60ee74501862 (diff) | |
download | PeerTube-8a2db2e8cb67f7f802ecb35be7b9154695f1a6ec.tar.gz PeerTube-8a2db2e8cb67f7f802ecb35be7b9154695f1a6ec.tar.zst PeerTube-8a2db2e8cb67f7f802ecb35be7b9154695f1a6ec.zip |
linting
Diffstat (limited to 'server')
-rw-r--r-- | server/tools/import-videos.ts | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/server/tools/import-videos.ts b/server/tools/import-videos.ts index 678503a3e..fd351ae7e 100644 --- a/server/tools/import-videos.ts +++ b/server/tools/import-videos.ts | |||
@@ -39,29 +39,29 @@ run().catch(err => console.error(err)) | |||
39 | 39 | ||
40 | let accessToken: string | 40 | let accessToken: string |
41 | let client: { id: string, secret: string } | 41 | let client: { id: string, secret: string } |
42 | 42 | ||
43 | const processOptions = { | 43 | const processOptions = { |
44 | cwd: __dirname, | 44 | cwd: __dirname, |
45 | maxBuffer: Infinity | 45 | maxBuffer: Infinity |
46 | } | 46 | } |
47 | 47 | ||
48 | async function promptPassword () { | 48 | async function promptPassword () { |
49 | return new Promise ( (res, rej) => { | 49 | return new Promise((res, rej) => { |
50 | prompt.start() | 50 | prompt.start() |
51 | const schema = { | 51 | const schema = { |
52 | properties: { | 52 | properties: { |
53 | password: { | 53 | password: { |
54 | hidden: true, | 54 | hidden: true, |
55 | required: true | 55 | required: true |
56 | } | 56 | } |
57 | } | 57 | } |
58 | } | 58 | } |
59 | prompt.get(schema, function (err, result) { | 59 | prompt.get(schema, function (err, result) { |
60 | if (err) { | 60 | if (err) { |
61 | return rej(err); | 61 | return rej(err) |
62 | } | 62 | } |
63 | return res(result.password) | 63 | return res(result.password) |
64 | }) | 64 | }) |
65 | }) | 65 | }) |
66 | } | 66 | } |
67 | 67 | ||
@@ -69,7 +69,7 @@ async function run () { | |||
69 | if (!user.password) { | 69 | if (!user.password) { |
70 | user.password = await promptPassword() | 70 | user.password = await promptPassword() |
71 | } | 71 | } |
72 | 72 | ||
73 | const res = await getClient(program['url']) | 73 | const res = await getClient(program['url']) |
74 | client = { | 74 | client = { |
75 | id: res.body.client_id, | 75 | id: res.body.client_id, |