Created
December 29, 2021 02:45
-
-
Save 0916dhkim/55f815b28b3ece839e90a6e10886a0db to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
router.post( | |
'/', | |
handleErrors(async (req, res) => { | |
const post = await prisma.post.create({ | |
data: { | |
title: req.body.title, | |
content: req.body.content, | |
}, | |
}); | |
res.send({post}); | |
}) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment