mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-25 08:29:26 +00:00
feat(audit): change audit log action to string at db level and split file/folder actions
This commit is contained in:
@@ -78,7 +78,7 @@ const route = new Hono<{ Variables: { user: User } }>()
|
||||
|
||||
const context = await assetService.getAssetContext(fileId)
|
||||
await auditLogService.logAction({
|
||||
action: AuditAction.asset_update,
|
||||
action: AuditAction.file_update,
|
||||
teamId: context.teamId,
|
||||
userId: user.id,
|
||||
projectId: context.projectId,
|
||||
@@ -107,7 +107,7 @@ const route = new Hono<{ Variables: { user: User } }>()
|
||||
for (let i = 0; i < req.ids.length; i++) {
|
||||
const ctx = contexts[i]
|
||||
await auditLogService.logAction({
|
||||
action: AuditAction.asset_delete,
|
||||
action: AuditAction.file_delete,
|
||||
teamId: ctx.teamId,
|
||||
userId: user.id,
|
||||
projectId: ctx.projectId,
|
||||
|
||||
Reference in New Issue
Block a user