This pull request is for task #232. I added the section aggregate endpoints to the professor controllers. I also made the function getProfessorQuery(flag string, c *gin.Context) which gets the query of the professor depending on the flag that can be used for both professorCourse() and professorSection(). That way we can reduce redundancy in the code, though I think there's still lots of redundancy in my code.
This pull request is for task #232. I added the section aggregate endpoints to the professor controllers. I also made the function
getProfessorQuery(flag string, c *gin.Context)
which gets the query of the professor depending on the flag that can be used for bothprofessorCourse()
andprofessorSection()
. That way we can reduce redundancy in the code, though I think there's still lots of redundancy in my code.Thank you.