-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Labels
L2A task suitable for someone who is comfortable implementing features.A task suitable for someone who is comfortable implementing features.good first issueGood for newcomersGood for newcomersrefactorRefactoring or rewriting the codebaseRefactoring or rewriting the codebase
Description
Section aggregate endpoints (/section/courses & /section/professors) use 2 Mongo pipelines, sectionCoursePipeline & sectionProfessorPipeline for aggregating data.
They are functional, but are hardcoded in each endpoint. Since the 2 pipelines share lots of stage, it would be more managable for us to write a single function that returns the appropriate pipeline based on the types of endpoints.
Moreover, improve the pipeline to aggregate /section/courses & /section/:id/course so that it should return an array of courses for the former and only a single course for the latter (instead of an array of one course).
Metadata
Metadata
Assignees
Labels
L2A task suitable for someone who is comfortable implementing features.A task suitable for someone who is comfortable implementing features.good first issueGood for newcomersGood for newcomersrefactorRefactoring or rewriting the codebaseRefactoring or rewriting the codebase