diff options
Diffstat (limited to 'server/helpers/custom-validators/search.ts')
-rw-r--r-- | server/helpers/custom-validators/search.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/server/helpers/custom-validators/search.ts b/server/helpers/custom-validators/search.ts index 2fde39160..15b389a58 100644 --- a/server/helpers/custom-validators/search.ts +++ b/server/helpers/custom-validators/search.ts | |||
@@ -11,9 +11,14 @@ function isStringArray (value: any) { | |||
11 | return isArray(value) && value.every(v => typeof v === 'string') | 11 | return isArray(value) && value.every(v => typeof v === 'string') |
12 | } | 12 | } |
13 | 13 | ||
14 | function isNSFWQueryValid (value: any) { | ||
15 | return value === 'true' || value === 'false' || value === 'both' | ||
16 | } | ||
17 | |||
14 | // --------------------------------------------------------------------------- | 18 | // --------------------------------------------------------------------------- |
15 | 19 | ||
16 | export { | 20 | export { |
17 | isNumberArray, | 21 | isNumberArray, |
18 | isStringArray | 22 | isStringArray, |
23 | isNSFWQueryValid | ||
19 | } | 24 | } |