From ccbb47c6192b365fe0573d8df2ab353cf0221be2 Mon Sep 17 00:00:00 2001 From: singharaj usai Date: Wed, 9 Oct 2024 14:52:08 -0400 Subject: [PATCH] admin dashboard fix delete forum reply --- server/functions/api/routes/admin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/functions/api/routes/admin.js b/server/functions/api/routes/admin.js index b95d6bf..5cadeb3 100644 --- a/server/functions/api/routes/admin.js +++ b/server/functions/api/routes/admin.js @@ -125,7 +125,7 @@ router.delete('/forum-posts/:id', authenticateToken, async (req, res) => { // Delete a forum reply router.delete('/forum-replies/:id', authenticateToken, async (req, res) => { try { - const reply = await Replies.findById(req.params.id); + const reply = await Reply.findById(req.params.id); if (!reply) { return res.status(404).json({ error: 'Reply not found' }); }