Skip to content

Add generic function professorAggregate() #326

@mikehquan19

Description

@mikehquan19

Overview

The controllers of professor aggregate endpoints rely on 2 functions:

  • professorCourse(flag string, c *gin.Context)
  • professorSection(flag string, c *gin.Context)

However, the business logic of these 2 functions are identical. Now that the function to dynamically produce Mongo pipeline has been written, we can combine both functions into one.
=> More abstraction, reusability

What to do

Add professorAggregate[T any](flag string, c *gin.Context that can handle the logic of both functions above.

Metadata

Metadata

Assignees

Labels

L2A task suitable for someone who is comfortable implementing features.feature requestNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions