import { chain } from 'lodash'
import * as flatten from 'flat'
import * as winston from 'winston'
import { chain } from 'lodash'
import * as flatten from 'flat'
import * as winston from 'winston'
import { jsonLoggerFormat, labelFormatter } from './logger'
import { User, VideoAbuse, VideoChannel, VideoDetails, VideoImport } from '../../shared'
import { VideoComment } from '../../shared/models/videos/video-comment.model'
import { CustomConfig } from '../../shared/models/server/custom-config.model'
import { jsonLoggerFormat, labelFormatter } from './logger'
import { User, VideoAbuse, VideoChannel, VideoDetails, VideoImport } from '../../shared'
import { VideoComment } from '../../shared/models/videos/video-comment.model'
import { CustomConfig } from '../../shared/models/server/custom-config.model'
level: 'audit',
maxsize: 5242880,
maxFiles: 5,
format: winston.format.combine(
winston.format.timestamp(),
level: 'audit',
maxsize: 5242880,
maxFiles: 5,
format: winston.format.combine(
winston.format.timestamp(),
- constructor (private keysToKeep: Array<string>, private prefix: string, private entityInfos: object) { }
+ constructor (private readonly keysToKeep: string[], private readonly prefix: string, private readonly entityInfos: object) { }
+
const infos: any = customConfig
const resolutionsDict = infos.transcoding.resolutions
const resolutionsArray = []
const infos: any = customConfig
const resolutionsDict = infos.transcoding.resolutions
const resolutionsArray = []
- Object.entries(resolutionsDict).forEach(([resolution, isEnabled]) => {
- if (isEnabled) resolutionsArray.push(resolution)
- })
+
+ Object.entries(resolutionsDict)
+ .forEach(([ resolution, isEnabled ]) => {
+ if (isEnabled) resolutionsArray.push(resolution)
+ })
+
Object.assign({}, infos, { transcoding: { resolutions: resolutionsArray } })
super(customConfigKeysToKeep, 'config', infos)
}
Object.assign({}, infos, { transcoding: { resolutions: resolutionsArray } })
super(customConfigKeysToKeep, 'config', infos)
}