import * as path from 'path'
+import * as express from 'express'
import { diff } from 'deep-object-diff'
import { chain } from 'lodash'
import * as flatten from 'flat'
import * as winston from 'winston'
-import { CONFIG } from '../initializers'
import { jsonLoggerFormat, labelFormatter } from './logger'
-import { VideoDetails, User, VideoChannel, VideoAbuse, VideoImport } from '../../shared'
+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 { CONFIG } from '../initializers/config'
+
+function getAuditIdFromRes (res: express.Response) {
+ return res.locals.oauth.token.User.username
+}
enum AUDIT_TYPE {
CREATE = 'create',
'channel-uuid',
'channel-name',
'support',
- 'commentsEnabled'
+ 'commentsEnabled',
+ 'downloadEnabled'
]
class VideoAuditView extends EntityAuditView {
constructor (private video: VideoDetails) {
'cache-captions-size',
'signup-enabled',
'signup-limit',
+ 'signup-requiresEmailVerification',
'admin-email',
'user-videoQuota',
'transcoding-enabled',
}
export {
+ getAuditIdFromRes,
+
auditLoggerFactory,
VideoImportAuditView,
VideoChannelAuditView,