1
0
Fork 0
peertube/server/helpers/custom-validators/logs.ts
2020-02-28 16:21:34 +01:00

14 lines
377 B
TypeScript

import { exists } from './misc'
import { LogLevel } from '../../../shared/models/server/log-level.type'
const logLevels: LogLevel[] = [ 'debug', 'info', 'warn', 'error' ]
function isValidLogLevel (value: any) {
return exists(value) && logLevels.includes(value)
}
// ---------------------------------------------------------------------------
export {
isValidLogLevel
}