Skip to content

Commit b823f7a

Browse files
committed
支持更新文章
1 parent 97961e2 commit b823f7a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/routes/posts.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,9 @@ router.post('/', (req, res) => {
2020
res.json(generatePost(req.body));
2121
});
2222

23+
// 更新文章
24+
router.put('/:id', (req, res) => {
25+
res.json(generatePost(req.body));
26+
});
27+
2328
module.exports = router;

0 commit comments

Comments
 (0)