1.2 KiB
1.2 KiB
Audit Log
User Perspective
The Change History page (/audit) shows a chronological log of all user-initiated changes to the workspace. Useful for tracking who changed what and when.
Each entry shows: actor, entity type, entity ID, action (create/update/delete), timestamp, and before/after JSON snapshots (expandable).
Developer Perspective
AuditService
AuditService.log(
actorId: string,
entityType: string, // 'Video', 'Template', 'DescriptionBlock', etc.
entityId: string,
action: string, // 'create', 'update', 'delete'
before?: object,
after?: object
)
When to Log
Every user-facing mutation (create/update/delete) must call AuditService.log(). Background/system operations (queue processors, channel import) do NOT log.
Adding Audit Logging to a Module
- Import
AuditModulein the module's@Module({ imports: [...] })array - Inject
AuditServicein the service constructor - Call
AuditService.log()in each mutation method
Tracked Entities
Video, VideoConfig, DescriptionBlock, Template, Collaborator, TeamVariable, SavedView, TeamMember
Related
- 02 - Backend (architecture)