We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0448cb commit caf60efCopy full SHA for caf60ef
controllers/posts-controller.js
@@ -65,7 +65,7 @@ export const getPostByCategoryHandler = async (req, res) => {
65
const category = req.params.category;
66
try {
67
// Validation - check if category is valid
68
- console.log(validCategories, category)
+
69
if (!validCategories.includes(category)) {
70
return res.status(HTTP_STATUS.BAD_REQUEST).json({ message: RESPONSE_MESSAGES.POSTS.INVALID_CATEGORY });
71
}
0 commit comments