mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 19:42:24 +02:00
Add audit logs for video import
This commit is contained in:
parent
2b86fe7274
commit
7e5f9f001d
3 changed files with 27 additions and 9 deletions
|
@ -5,7 +5,7 @@ import * as flatten from 'flat'
|
|||
import * as winston from 'winston'
|
||||
import { CONFIG } from '../initializers'
|
||||
import { jsonLoggerFormat, labelFormatter } from './logger'
|
||||
import { VideoDetails, User, VideoChannel, VideoAbuse } from '../../shared'
|
||||
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'
|
||||
|
||||
|
@ -119,6 +119,17 @@ class VideoAuditView extends EntityAuditView {
|
|||
}
|
||||
}
|
||||
|
||||
const videoImportKeysToKeep = [
|
||||
'id',
|
||||
'targetUrl',
|
||||
'video-name'
|
||||
]
|
||||
class VideoImportAuditView extends EntityAuditView {
|
||||
constructor (private videoImport: VideoImport) {
|
||||
super(videoImportKeysToKeep, 'video-import', videoImport)
|
||||
}
|
||||
}
|
||||
|
||||
const commentKeysToKeep = [
|
||||
'id',
|
||||
'text',
|
||||
|
@ -246,6 +257,7 @@ class CustomConfigAuditView extends EntityAuditView {
|
|||
|
||||
export {
|
||||
auditLoggerFactory,
|
||||
VideoImportAuditView,
|
||||
VideoChannelAuditView,
|
||||
CommentAuditView,
|
||||
UserAuditView,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue