public async Task <IActionResult> AddLinkToCourse([FromBody] string _CourseName) { try { var CourseID = _courseService.GetCourseIdByName(_CourseName); var UserID = Guid.Parse(User.GetLoggedInUserId <string>()); var TeacherID = _teacherService.GetTeacherIDByUserID(UserID); var teacherCourse = await _teacherService.AddLinkToCourse(CourseID, TeacherID); return(Ok("Link Added")); } catch (Exception e) { return(BadRequest(e.Message)); } }