feat(audit-logging): Replace req.session with req.auth for audit logging in notes and projects
This commit is contained in:
@@ -33,7 +33,7 @@ async function createNoteHandler(req) {
|
||||
AUDIT_ACTIONS.NOTE_CREATE,
|
||||
RESOURCE_TYPES.NOTE,
|
||||
result.lastInsertRowid.toString(),
|
||||
req.session,
|
||||
req.auth, // Use req.auth instead of req.session
|
||||
{
|
||||
noteData: { project_id, task_id, note_length: note.length },
|
||||
}
|
||||
@@ -63,7 +63,7 @@ async function deleteNoteHandler(req, { params }) {
|
||||
AUDIT_ACTIONS.NOTE_DELETE,
|
||||
RESOURCE_TYPES.NOTE,
|
||||
id,
|
||||
req.session,
|
||||
req.auth, // Use req.auth instead of req.session
|
||||
{
|
||||
deletedNote: {
|
||||
project_id: note?.project_id,
|
||||
@@ -101,7 +101,7 @@ async function updateNoteHandler(req, { params }) {
|
||||
AUDIT_ACTIONS.NOTE_UPDATE,
|
||||
RESOURCE_TYPES.NOTE,
|
||||
noteId,
|
||||
req.session,
|
||||
req.auth, // Use req.auth instead of req.session
|
||||
{
|
||||
originalNote: {
|
||||
note_length: originalNote?.note?.length || 0,
|
||||
|
||||
Reference in New Issue
Block a user