mirror of https://github.com/Chocobozzz/PeerTube
peertube auth add wants a URL (and not a host)
parent
cb9d028a6b
commit
fd0bfc3ac4
|
@ -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: {
|
||||||
|
|
Loading…
Reference in New Issue