예제 #1
0
        public async Task <IActionResult> UpdateCourseComment(
            [FromRoute] int courseId,
            [FromBody] CourseCommentRequestModel courseCommentRequestModel)
        {
            var model = _requestModelMapper.Map(courseCommentRequestModel);
            await _courseCommentService.UpdateAsync(model);

            return(Ok());
        }
예제 #2
0
        public async Task <CourseCommentResponseModel> AddCourseComment(
            [FromRoute] int courseId,
            [FromBody] CourseCommentRequestModel courseCommentRequestModel)
        {
            var model = _requestModelMapper.Map(courseCommentRequestModel);

            model = await _courseCommentService.AddAsync(model);

            return(_responseModelMapper.Map(model));
        }