add features

This commit is contained in:
Matthias Hochmeister
2026-02-27 20:33:43 +01:00
parent e2713e25ba
commit 46d3f5b351
9 changed files with 33 additions and 52 deletions

View File

@@ -132,9 +132,9 @@ export function auditMiddleware(
// Resource ID: prefer controller override, then route param, then body id.
const resourceId =
res.locals.auditResourceId ??
req.params.id ??
(req.params as Record<string, string>).id ??
(body !== null && typeof body === 'object'
? (body as Record<string, unknown>)?.data?.id as string | undefined
? ((body as Record<string, unknown>)?.data as Record<string, unknown>)?.id as string | undefined
: undefined) ??
null;