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 { VideoDetails, User, VideoChannel, VideoAbuse, VideoImport } from '../../shared'
import { VideoComment } from '../../shared/models/videos/video-comment.model'
import { CustomConfig } from '../../shared/models/server/custom-config.model'
+import { UserModel } from '../models/account/user'
+
+function getAuditIdFromRes (res: express.Response) {
+ return (res.locals.oauth.token.User as UserModel).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,