Skip to content

Commit 35439e7

Browse files
committed
added features: user can update tags for articles
1 parent d05faf3 commit 35439e7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

controllers/articlesController.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ const updateArticle = asyncHandler(async (req, res) => {
167167
if (article.body) {
168168
target.body = article.body;
169169
}
170+
if (article.tagList) {
171+
target.tagList = article.tagList;
172+
}
170173

171174
await target.save();
172175
return res.status(200).json({

0 commit comments

Comments
 (0)