Skip to content

Commit

Permalink
Commented out Guestbook.create({ message }) to prevent duplicate entries
Browse files Browse the repository at this point in the history
  • Loading branch information
Illyism committed Mar 6, 2024
1 parent db61c46 commit f7e23ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sample-apps/next-sample-app/app/mongoose/write/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export async function POST(req: NextRequest) {
async () => {
const { message } = body
const msg = await Guestbook.find({ message }, {}, { sort: { _id: -1 } });
await Guestbook.create({ message });
// await Guestbook.create({ message });
}
);
return NextResponse.json({ message: "Message added" });
Expand Down

0 comments on commit f7e23ee

Please sign in to comment.