Skip to content

Commit

Permalink
modify name and comment on code for alumni case
Browse files Browse the repository at this point in the history
  • Loading branch information
mla04762 committed Jul 20, 2023
1 parent e527caf commit e4617ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Gordon360/Controllers/ScheduleController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public async Task<ActionResult<JArray>> GetAsync(string username, [FromQuery] st
/// </summary>
/// <returns>A IEnumerable of session objects as well as the schedules</returns>
[HttpGet]
[Route("{username}/courses")]
[Route("{username}/allcourses")]
public async Task<ActionResult<SessionCoursesViewModel>> GetAllCourses(string username)
{
var result = await _scheduleService.GetAllCourses(username);
Expand Down
4 changes: 3 additions & 1 deletion Gordon360/Services/ScheduleService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public async Task<IEnumerable<ScheduleViewModel>> 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
});
Expand Down Expand Up @@ -121,6 +121,8 @@ public async Task<IEnumerable<SessionCoursesViewModel>> 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),
Expand Down

0 comments on commit e4617ce

Please sign in to comment.