mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Add to playlist dropdown
This commit is contained in:
parent
830b4faff1
commit
f0a3988066
55 changed files with 961 additions and 94 deletions
|
@ -49,12 +49,19 @@ function toValueOrNull (value: string) {
|
|||
return value
|
||||
}
|
||||
|
||||
function toArray (value: string) {
|
||||
function toArray (value: any) {
|
||||
if (value && isArray(value) === false) return [ value ]
|
||||
|
||||
return value
|
||||
}
|
||||
|
||||
function toIntArray (value: any) {
|
||||
if (!value) return []
|
||||
if (isArray(value) === false) return [ validator.toInt(value) ]
|
||||
|
||||
return value.map(v => validator.toInt(v))
|
||||
}
|
||||
|
||||
function isFileValid (
|
||||
files: { [ fieldname: string ]: Express.Multer.File[] } | Express.Multer.File[],
|
||||
mimeTypeRegex: string,
|
||||
|
@ -97,5 +104,6 @@ export {
|
|||
isBooleanValid,
|
||||
toIntOrNull,
|
||||
toArray,
|
||||
toIntArray,
|
||||
isFileValid
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue