Skip to content

Commit

Permalink
fix(article): remove check for exisiting article
Browse files Browse the repository at this point in the history
  • Loading branch information
HoseaCodes committed Aug 11, 2023
1 parent cc58a8e commit 2237097
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions controllers/article.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ async function createArticle(req, res) {

const article = await Articles.find({ article_id });

if (article) {
// if (article) {

logger.error("Article already exist.");
// logger.error("Article already exist.");

return res.status(400).json({ msg: "This article already exists." })
}
// return res.status(400).json({ msg: "This article already exists." })
// }

const newArticle = new Articles({
article_id, title, subtitle, markdown, description, images, category
Expand Down

0 comments on commit 2237097

Please sign in to comment.