Created
April 12, 2019 12:19
-
-
Save emmsdan/7f83142b9d1c6ca8b12d3b68de72bbea 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
| updateArticle (req, res); | |
| updateArticle => | |
| const { tags, title, description, body, images } = res.body; | |
| const updatedArticle = Articles.update( | |
| { tags, title, description, body, images }, | |
| { where: { id: 'sdfw3edcs-dc-xwedsvc-ew' } }); | |
| const tagUpdate = updateTags(tags, updatedArticle.id); | |
| if (tagUpdate.status === 'error') return errorResponse(tagUpdate.message); | |
| if (updateArticle < 0){ | |
| return errorResponse('msakdnfnas'); | |
| } | |
| return sucessResposne(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment