Skip to content

Commit

Permalink
added features: user can update tags for articles
Browse files Browse the repository at this point in the history
  • Loading branch information
winterrrrrff committed Dec 30, 2022
1 parent d05faf3 commit 35439e7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions controllers/articlesController.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ const updateArticle = asyncHandler(async (req, res) => {
if (article.body) {
target.body = article.body;
}
if (article.tagList) {
target.tagList = article.tagList;
}

await target.save();
return res.status(200).json({
Expand Down

0 comments on commit 35439e7

Please sign in to comment.