Skip to content

Commit

Permalink
Merge pull request #29 from EmTanIT/tanBE
Browse files Browse the repository at this point in the history
Add module find Course By Type
  • Loading branch information
bentran1vn committed Oct 4, 2023
2 parents facd3e0 + fa46b33 commit c9a4eb3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion routes/examSlot.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,20 @@ router.get('/', async (req, res) => {
for (const key in subjectList) {
if(subjectList[key][examType.type.toLowerCase()] > 0) {
// console.log(subjectList[key][examType.type.toLowerCase()]);
listSubByPhase.push(subjectList[key])
listSubByPhase.push(subjectList[key].id)
};
}

console.log(listSubByPhase.length);

let courseByPhase = await Course.findAll({
where:{
subId: listSubByPhase
}
})

console.log(courseByPhase.length);

//-----

// const slotList = await TimeSlot.findAll()
Expand Down

0 comments on commit c9a4eb3

Please sign in to comment.