peertube auth add wants a URL (and not a host)

pull/1958/head
Chocobozzz 2019-07-04 15:03:15 +02:00
parent cb9d028a6b
commit fd0bfc3ac4
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 2 additions and 1 deletions

View File

@ -39,7 +39,7 @@ async function setInstance (url: string, username: string, password: string, isD
} }
function isURLaPeerTubeInstance (url: string) { function isURLaPeerTubeInstance (url: string) {
return isHostValid(url) || (url.includes('localhost')) return url.startsWith('http://') || url.startsWith('https://')
} }
program program
@ -61,6 +61,7 @@ program
url: { url: {
description: 'instance url', description: 'instance url',
conform: (value) => isURLaPeerTubeInstance(value), conform: (value) => isURLaPeerTubeInstance(value),
message: 'It should be an URL (https://peertube.example.com)',
required: true required: true
}, },
username: { username: {