replaced some console.errors with logger

This commit is contained in:
jackiettran
2026-01-10 20:47:29 -05:00
parent 86cb8b3fe0
commit 415bcc5021
15 changed files with 165 additions and 174 deletions

View File

@@ -729,7 +729,7 @@ router.patch('/posts/:id/status', authenticateToken, async (req, res, next) => {
stack: emailError.stack,
postId: req.params.id
});
console.error("Email notification error:", emailError);
logger.error("Email notification error", { error: emailError });
}
})();
}
@@ -909,7 +909,7 @@ router.patch('/posts/:id/accept-answer', authenticateToken, async (req, res, nex
commentId: commentId,
postId: req.params.id
});
console.error("Email notification error:", emailError);
logger.error("Email notification error", { error: emailError });
}
})();
}
@@ -1109,7 +1109,7 @@ router.post('/posts/:id/comments', authenticateToken, async (req, res, next) =>
commentId: comment.id,
postId: req.params.id
});
console.error("Email notification error:", emailError);
logger.error("Email notification error", { error: emailError });
}
})();
@@ -1689,7 +1689,7 @@ router.patch('/admin/posts/:id/close', authenticateToken, requireAdmin, async (r
stack: emailError.stack,
postId: req.params.id
});
console.error("Email notification error:", emailError);
logger.error("Email notification error", { error: emailError });
}
})();