X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fcustom-validators%2Fsearch.ts;h=a8f25883832c4588b122eee4a801904a5bcf136a;hb=8f581725651c4b2c213d75fc028e306bbf239d3e;hp=429fcafcf9525f94e392f88baeb687a559d88a36;hpb=3b0bd70aa05ab82fa30fe67ed4899d44652c703a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/helpers/custom-validators/search.ts b/server/helpers/custom-validators/search.ts index 429fcafcf..a8f258838 100644 --- a/server/helpers/custom-validators/search.ts +++ b/server/helpers/custom-validators/search.ts @@ -11,7 +11,7 @@ function isStringArray (value: any) { return isArray(value) && value.every(v => typeof v === 'string') } -function isNSFWQueryValid (value: any) { +function isBooleanBothQueryValid (value: any) { return value === 'true' || value === 'false' || value === 'both' } @@ -32,6 +32,6 @@ function isSearchTargetValid (value: SearchTargetType) { export { isNumberArray, isStringArray, - isNSFWQueryValid, + isBooleanBothQueryValid, isSearchTargetValid }