diff --git a/controllers/contentControllers/topic.js b/controllers/contentControllers/topic.js index 16f41d2..10da6a6 100644 --- a/controllers/contentControllers/topic.js +++ b/controllers/contentControllers/topic.js @@ -32,9 +32,9 @@ export const getTopicBySectionId = async (req, res) => { const { sectionId } = req.params; const sectionExists = await models.Section.findByPk(sectionId); - if (!sectionExists) { - return response(404, null, "Section not found", res); - } + // if (!sectionExists) { + // return response(404, null, "Section not found", res); + // } const topics = await models.Topic.findAll({ where: { ID_SECTION: sectionId }, @@ -167,6 +167,7 @@ export const getCompletedTopicsBySection = async (req, res) => { "ID_SECTION", "NAME_SECTION", "DESCRIPTION_SECTION", + "THUMBNAIL", ], }, ], @@ -204,6 +205,7 @@ export const getCompletedTopicsBySection = async (req, res) => { ID_SECTION: section.ID_SECTION, NAME_SECTION: section.NAME_SECTION, DESCRIPTION_SECTION: section.DESCRIPTION_SECTION, + THUMBNAIL: section.THUMBNAIL, TOTAL_TOPICS: totalTopicsInSection, COMPLETED_TOPICS: 0, };