]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/helpers/custom-validators/logs.ts
emit more specific status codes on video upload (#3423)
[github/Chocobozzz/PeerTube.git] / server / helpers / custom-validators / logs.ts
CommitLineData
fd8710b8
C
1import { exists } from './misc'
2import { LogLevel } from '../../../shared/models/server/log-level.type'
3
4const logLevels: LogLevel[] = [ 'debug', 'info', 'warn', 'error' ]
5
6function isValidLogLevel (value: any) {
bdd428a6 7 return exists(value) && logLevels.includes(value)
fd8710b8
C
8}
9
10// ---------------------------------------------------------------------------
11
12export {
13 isValidLogLevel
14}