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