aboutsummaryrefslogtreecommitdiffstats
path: root/pages/api/notes/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'pages/api/notes/index.js')
-rw-r--r--pages/api/notes/index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/pages/api/notes/index.js b/pages/api/notes/index.js
index 86369ed..2c53909 100644
--- a/pages/api/notes/index.js
+++ b/pages/api/notes/index.js
@@ -26,7 +26,7 @@ export default withSession(async (req, res) => {
try {
const session = await conn.startSession()
const user = req.session.get('user')
- const { title, content } = req.body
+ const { title, content } = JSON.parse(req.body)
if (!user || !user?.isVerified || !content) {
throw new Error('Something went wrong')