From 08e6168212b2543e89eb2c6bfcd92b8197d144e0 Mon Sep 17 00:00:00 2001 From: James Louie Grande Date: Wed, 8 Nov 2023 22:35:58 -1000 Subject: [PATCH] Fix wrong req method --- my-app/src/pages/api/mongo/thread/id/[_id].js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/my-app/src/pages/api/mongo/thread/id/[_id].js b/my-app/src/pages/api/mongo/thread/id/[_id].js index d5152ab..0e41022 100644 --- a/my-app/src/pages/api/mongo/thread/id/[_id].js +++ b/my-app/src/pages/api/mongo/thread/id/[_id].js @@ -6,7 +6,7 @@ export default async function handler(req, res) { await connectDB(); const { _id } = req.query; - if (req.method === "POST") { + if (req.method === "GET") { const thread = await Thread.findById(_id); res.status(200).json(thread); }