Skip to content

Commit

Permalink
Merge 3e5cdda into 7979226
Browse files Browse the repository at this point in the history
  • Loading branch information
Anguandia committed Nov 4, 2019
2 parents 7979226 + 3e5cdda commit a55d3ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/controllers/articles.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,12 +361,12 @@ class Articles {
util.setError(401, 'Sorry you can not UPDATE an article that does not belong to you.');
return util.send(res);
}
const { title, body, description } = req.body;
const { title, body, description, images, } = req.body;
const updatedArticle = await articleService.updateArticle(req.params.slug, {
slug: `${slug(title)}-${uniqid()}`,
title,
body,
description,
images,
taglist: req.body.taglist.split(' ')
});
util.setSuccess(200, 'Article Updated successfully!', updatedArticle);
Expand Down
2 changes: 1 addition & 1 deletion src/routes/api/article/article.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ router.delete(
[auth, confirmEmailAuth],
articleController.deleteArticle
);
router.patch(
router.put(
'/:slug',
[auth, confirmEmailAuth],
imageUpload.array('images', 10),
Expand Down

0 comments on commit a55d3ab

Please sign in to comment.