public IActionResult Attend([FromBody] LectureAttendRequest request) { try { var userId = _authenticationService.GetAuthenticatedUserId(User); _lectureService.Attend(request.LectureId, userId); return(new ObjectResult(new { StatusCode = ResponseConstants.Success })); } catch (UserAlreadyAttendedException) { return(new ObjectResult(new Result { StatusCode = ResponseConstants.Unknown })); } catch (Exception) { return(new ObjectResult(new Result { StatusCode = ResponseConstants.Unknown })); } }