aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tools
diff options
context:
space:
mode:
Diffstat (limited to 'server/tools')
-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,