Skip to content

Determine the cause of duplicate professors returned in endpoint /course/professors #287

@mikehquan19

Description

@mikehquan19

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.

Metadata

Metadata

Labels

L2A task suitable for someone who is comfortable implementing features.good first issueGood for newcomers

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions