feat(audit): change audit log action to string at db level and split file/folder actions

This commit is contained in:
yiling
2026-08-01 14:49:08 +08:00
parent 6d80f06c22
commit 5ef7716c9c
19 changed files with 192 additions and 193 deletions
+3 -3
View File
@@ -111,7 +111,7 @@ describe('folder api', () => {
id: 'test-id',
})
expect(auditLogService.logAction).toHaveBeenCalledWith({
action: 'asset_update',
action: 'folder_update',
teamId: 'test-team',
userId: 'user1',
projectId: undefined,
@@ -149,7 +149,7 @@ describe('folder api', () => {
id: 'parent-id',
})
expect(auditLogService.logAction).toHaveBeenCalledWith({
action: 'asset_create',
action: 'folder_create',
teamId: 'test-team',
userId: 'user1',
projectId: undefined,
@@ -210,7 +210,7 @@ describe('folder api', () => {
})
expect(assetService.deleteAssets).toHaveBeenCalledWith(['test-id'])
expect(auditLogService.logAction).toHaveBeenCalledWith({
action: 'asset_delete',
action: 'folder_delete',
teamId: 'test-team',
userId: 'user1',
projectId: undefined,