seas-computing / course-planner

SEAS Course Planning Application. JSDoc Docs at: https://seas-computing.github.io/course-planner/
0 stars 1 forks source link

Update semester service's addAcademicYear function to use TypeORM create method #645

Open natalynyu opened 1 year ago

natalynyu commented 1 year ago

The preferred method for creating new instances in TypeORM is to use the .create method. For the most part, we've created instances using new (e.g. new Semester() for making new semester instances). We should, for consistency purposes, change the addAcademicYear function to create new instances using the TypeORM .create method instead.

TypeORM repository documentation: https://github.com/typeorm/typeorm/blob/master/docs/repository-api.md