refactor: comment 404 response (topic model) for implementation purpose
This commit is contained in:
parent
30ffed17be
commit
4915928969
|
|
@ -176,9 +176,9 @@ export const getCompletedTopicsBySection = async (req, res) => {
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!completedLevels.length) {
|
// if (!completedLevels.length) {
|
||||||
return response(404, null, "No completed topics found", res);
|
// return response(404, null, "No completed topics found", res);
|
||||||
}
|
// }
|
||||||
|
|
||||||
const completedSections = {};
|
const completedSections = {};
|
||||||
|
|
||||||
|
|
@ -215,6 +215,10 @@ export const getCompletedTopicsBySection = async (req, res) => {
|
||||||
|
|
||||||
const result = Object.values(completedSections);
|
const result = Object.values(completedSections);
|
||||||
|
|
||||||
|
// if (!result.length) {
|
||||||
|
// return response(404, null, "No completed topics for Level 6 found", res);
|
||||||
|
// }
|
||||||
|
|
||||||
response(
|
response(
|
||||||
200,
|
200,
|
||||||
result,
|
result,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user