add features
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user