refactor: comment 404 response (topic model) for implementation purpose

This commit is contained in:
elangptra 2024-10-02 13:20:27 +07:00
parent 4915928969
commit 8007844fa8

View File

@ -40,9 +40,9 @@ export const getTopicBySectionId = async (req, res) => {
where: { ID_SECTION: sectionId }, where: { ID_SECTION: sectionId },
}); });
if (!topics || topics.length === 0) { // if (!topics || topics.length === 0) {
return response(404, null, "No topics found for this section", res); // return response(404, null, "No topics found for this section", res);
} // }
response(200, topics, "Success", res); response(200, topics, "Success", res);
} catch (error) { } catch (error) {