fix(api): harden optional audit and session fields
This commit is contained in:
@@ -40,7 +40,7 @@ export async function updateSystemRoleConfig(
|
||||
entityId: input.role,
|
||||
entityName: result.label,
|
||||
action: "UPDATE",
|
||||
userId: ctx.dbUser?.id,
|
||||
...(ctx.dbUser?.id ? { userId: ctx.dbUser.id } : {}),
|
||||
before: (existing ?? {}) as unknown as Record<string, unknown>,
|
||||
after: result as unknown as Record<string, unknown>,
|
||||
source: "ui",
|
||||
|
||||
Reference in New Issue
Block a user