aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/audit-logger.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/audit-logger.ts')
-rw-r--r--server/helpers/audit-logger.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/server/helpers/audit-logger.ts b/server/helpers/audit-logger.ts
index 7db72b69c..00311fce1 100644
--- a/server/helpers/audit-logger.ts
+++ b/server/helpers/audit-logger.ts
@@ -1,4 +1,5 @@
1import * as path from 'path' 1import * as path from 'path'
2import * as express from 'express'
2import { diff } from 'deep-object-diff' 3import { diff } from 'deep-object-diff'
3import { chain } from 'lodash' 4import { chain } from 'lodash'
4import * as flatten from 'flat' 5import * as flatten from 'flat'
@@ -8,6 +9,11 @@ import { jsonLoggerFormat, labelFormatter } from './logger'
8import { VideoDetails, User, VideoChannel, VideoAbuse, VideoImport } from '../../shared' 9import { VideoDetails, User, VideoChannel, VideoAbuse, VideoImport } from '../../shared'
9import { VideoComment } from '../../shared/models/videos/video-comment.model' 10import { VideoComment } from '../../shared/models/videos/video-comment.model'
10import { CustomConfig } from '../../shared/models/server/custom-config.model' 11import { CustomConfig } from '../../shared/models/server/custom-config.model'
12import { UserModel } from '../models/account/user'
13
14function getAuditIdFromRes (res: express.Response) {
15 return (res.locals.oauth.token.User as UserModel).username
16}
11 17
12enum AUDIT_TYPE { 18enum AUDIT_TYPE {
13 CREATE = 'create', 19 CREATE = 'create',
@@ -255,6 +261,8 @@ class CustomConfigAuditView extends EntityAuditView {
255} 261}
256 262
257export { 263export {
264 getAuditIdFromRes,
265
258 auditLoggerFactory, 266 auditLoggerFactory,
259 VideoImportAuditView, 267 VideoImportAuditView,
260 VideoChannelAuditView, 268 VideoChannelAuditView,