The aggregate endpoint /course/professors, which returns the list of professors from the queried courses, has been implemented. However, after testing the endpoint around, I realize that it returns duplicate professors.
For example, /course/professors?subject_prefix=CS&course_number=3354 will have:
{
"_id": "67cc15f9e13b9b509188d89e",
"first_name": "Priya",
"last_name": "Narayanasami",
...
},
{
"_id": "67cc15f9e13b9b509188d89e",
"first_name": "Priya",
"last_name": "Narayanasami",
...
},
Determine the cause of it, which most likely stems from the MongoDB aggregate pipeline. Then, verify the uniqueness of data returned by /professor/courses and /professor/sections as well and fix it if there's any problem.
The endpoint is being implemented in branch course-aggregate, this needs to be fixed before we can merge it to develop.
The aggregate endpoint
/course/professors, which returns the list of professors from the queried courses, has been implemented. However, after testing the endpoint around, I realize that it returns duplicate professors.For example,
/course/professors?subject_prefix=CS&course_number=3354will have:Determine the cause of it, which most likely stems from the MongoDB aggregate pipeline. Then, verify the uniqueness of data returned by
/professor/coursesand/professor/sectionsas well and fix it if there's any problem.The endpoint is being implemented in branch
course-aggregate, this needs to be fixed before we can merge it to develop.