]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - server/helpers/custom-validators/logs.ts
Add ability to limit videos history size
[github/Chocobozzz/PeerTube.git] / server / helpers / custom-validators / logs.ts
1 import { exists } from './misc'
2 import { LogLevel } from '../../../shared/models/server/log-level.type'
3
4 const logLevels: LogLevel[] = [ 'debug', 'info', 'warn', 'error' ]
5
6 function isValidLogLevel (value: any) {
7 return exists(value) && logLevels.indexOf(value) !== -1
8 }
9
10 // ---------------------------------------------------------------------------
11
12 export {
13 isValidLogLevel
14 }