public CourseTracker UpdateCourseAsWatched(int trackerId, [FromBody] CourseTracker updatedTracker) { try { return(_repository.UpdateCourseTracker(updatedTracker)); } catch (System.Exception ex) { throw new System.Exception("Couldn't update the course track"); } }
public CourseTracker AddCourseTracker([FromBody] CourseTracker tracker) { try { tracker.ApplicationUserId = ((ClaimsIdentity)User.Identity).Claims.FirstOrDefault().Value; return(_repository.AddTracker(tracker)); } catch (System.Exception ex) { throw new System.Exception("Couldn't add the course to tracking"); } }