From 49159289691c65d9fce081bad9957e84519d2b2c Mon Sep 17 00:00:00 2001 From: elangptra Date: Wed, 2 Oct 2024 13:20:02 +0700 Subject: [PATCH] refactor: comment 404 response (topic model) for implementation purpose --- controllers/contentControllers/topic.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/controllers/contentControllers/topic.js b/controllers/contentControllers/topic.js index 9534000..71be894 100644 --- a/controllers/contentControllers/topic.js +++ b/controllers/contentControllers/topic.js @@ -176,9 +176,9 @@ export const getCompletedTopicsBySection = async (req, res) => { ], }); - if (!completedLevels.length) { - return response(404, null, "No completed topics found", res); - } + // if (!completedLevels.length) { + // return response(404, null, "No completed topics found", res); + // } const completedSections = {}; @@ -215,6 +215,10 @@ export const getCompletedTopicsBySection = async (req, res) => { const result = Object.values(completedSections); + // if (!result.length) { + // return response(404, null, "No completed topics for Level 6 found", res); + // } + response( 200, result,