mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Search channels against handles and not names
This commit is contained in:
parent
fbd67e7f38
commit
b033851fb5
17 changed files with 87 additions and 34 deletions
|
@ -23,6 +23,10 @@ function isNotEmptyIntArray (value: any) {
|
|||
return Array.isArray(value) && value.every(v => validator.isInt('' + v)) && value.length !== 0
|
||||
}
|
||||
|
||||
function isNotEmptyStringArray (value: any) {
|
||||
return Array.isArray(value) && value.every(v => typeof v === 'string' && v.length !== 0) && value.length !== 0
|
||||
}
|
||||
|
||||
function isArrayOf (value: any, validator: (value: any) => boolean) {
|
||||
return isArray(value) && value.every(v => validator(v))
|
||||
}
|
||||
|
@ -187,6 +191,7 @@ export {
|
|||
isIntOrNull,
|
||||
isIdValid,
|
||||
isSafePath,
|
||||
isNotEmptyStringArray,
|
||||
isUUIDValid,
|
||||
toCompleteUUIDs,
|
||||
toCompleteUUID,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue