Skip to content

Commit

Permalink
Fix wrong req method
Browse files Browse the repository at this point in the history
  • Loading branch information
GrandeJames committed Nov 9, 2023
1 parent 8d42b25 commit 08e6168
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion my-app/src/pages/api/mongo/thread/id/[_id].js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 08e6168

Please sign in to comment.