aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorJohn Livingston <git@john-livingston.fr>2018-05-11 11:26:50 +0200
committerChocobozzz <me@florianbigard.com>2018-05-11 15:23:50 +0200
commit8a2db2e8cb67f7f802ecb35be7b9154695f1a6ec (patch)
tree21a221f8ed79c70d162a841f5eda1ed05c176133 /server
parent7eb5f8cd32d507604584231cb78c60ee74501862 (diff)
downloadPeerTube-8a2db2e8cb67f7f802ecb35be7b9154695f1a6ec.tar.gz
PeerTube-8a2db2e8cb67f7f802ecb35be7b9154695f1a6ec.tar.zst
PeerTube-8a2db2e8cb67f7f802ecb35be7b9154695f1a6ec.zip
linting
Diffstat (limited to 'server')
-rw-r--r--server/tools/import-videos.ts36
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
40let accessToken: string 40let accessToken: string
41let client: { id: string, secret: string } 41let client: { id: string, secret: string }
42 42
43const processOptions = { 43const processOptions = {
44 cwd: __dirname, 44 cwd: __dirname,
45 maxBuffer: Infinity 45 maxBuffer: Infinity
46} 46}
47 47
48async function promptPassword () { 48async 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,