Add ability to retrieve specific comments for reconciliation process

Update routes to use a new method for fetching a single reconciliation comment by ID, replacing the previous approach of fetching all comments and filtering client-side. This change is reflected in both `routes.ts` and `storage.ts`, where a new `getReconciliationCommentById` method is introduced in the `IStorage` interface and implemented in `DatabaseStorage` and `MemStorage`.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/waxFZ5i
This commit is contained in:
michaelschal committed 2025-09-19 17:21:42 +00:00
1 parent 5f1229c6e1
commit 2e59eec409
4 files changed
+94 -4

No files matched your search

+2 -4
View File
@@ -1419,8 +1419,7 @@ export async function registerRoutes(app: Express): Promise<Server> {
}
const commentId = parseInt(req.params.id);
const comments = await storage.getReconciliationComments(0); // Get all to find the comment
const comment = comments.find(c => c.id === commentId);
const comment = await storage.getReconciliationCommentById(commentId);
if (!comment) {
return res.status(404).json({ message: "Comment not found" });
@@ -1458,8 +1457,7 @@ export async function registerRoutes(app: Express): Promise<Server> {
}
const commentId = parseInt(req.params.id);
const comments = await storage.getReconciliationComments(0); // Get all to find the comment
const comment = comments.find(c => c.id === commentId);
const comment = await storage.getReconciliationCommentById(commentId);
if (!comment) {
return res.status(404).json({ message: "Comment not found" });