From e4617ce9d92449e88b4896a251d107e3678d8739 Mon Sep 17 00:00:00 2001 From: Ki Eun Kim Date: Thu, 20 Jul 2023 09:04:51 -0400 Subject: [PATCH] modify name and comment on code for alumni case --- Gordon360/Controllers/ScheduleController.cs | 2 +- Gordon360/Services/ScheduleService.cs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Gordon360/Controllers/ScheduleController.cs b/Gordon360/Controllers/ScheduleController.cs index ec6aa873d..25f002e49 100644 --- a/Gordon360/Controllers/ScheduleController.cs +++ b/Gordon360/Controllers/ScheduleController.cs @@ -122,7 +122,7 @@ public async Task> GetAsync(string username, [FromQuery] st /// /// A IEnumerable of session objects as well as the schedules [HttpGet] - [Route("{username}/courses")] + [Route("{username}/allcourses")] public async Task> GetAllCourses(string username) { var result = await _scheduleService.GetAllCourses(username); diff --git a/Gordon360/Services/ScheduleService.cs b/Gordon360/Services/ScheduleService.cs index ca2f1b9c7..4b1ff484a 100644 --- a/Gordon360/Services/ScheduleService.cs +++ b/Gordon360/Services/ScheduleService.cs @@ -89,7 +89,7 @@ public async Task> GetScheduleFacultyAsync(string TUESDAY_CDE = x.TUESDAY_CDE, WEDNESDAY_CDE = x.WEDNESDAY_CDE, THURSDAY_CDE = x.THURSDAY_CDE, - FRIDAY_CDE = x.FRIDAY_CDE, + FRIDAY_CDE = x.FRIDAY_CDE, BEGIN_TIME = x.BEGIN_TIME, END_TIME = x.END_TIME }); @@ -121,6 +121,8 @@ public async Task> GetAllCourses(string use SessionDescription = vm.SessionDescription, SessionBeginDate = vm.SessionBeginDate, SessionEndDate = vm.SessionEndDate, + //The case for "ALUMNI" does not work at the moment currently, but it doesn't affect the code, + //and might be used in the future, so we decided to leave it in. AllCourses = account.account_type == "STUDENT" || account.account_type == "ALUMNI" ? await GetScheduleStudentAsync(username, vm.SessionCode) : await GetScheduleFacultyAsync(username, vm.SessionCode),