diff --git a/backend/api/controllers/new-quotes.js b/backend/api/controllers/new-quotes.js index 552bd49d0..0223eeaf8 100644 --- a/backend/api/controllers/new-quotes.js +++ b/backend/api/controllers/new-quotes.js @@ -22,7 +22,7 @@ class NewQuotesController { try { let { uid } = req.decodedToken; let { text, source, language } = req.body; - if (text === "" || source === "") { + if (!text || !source || !language) { throw new MonkeyError(400, "Please fill all the fields"); } let data = await NewQuotesDAO.add(text, source, language, uid);