using Diligent.WebAPI.Contracts.DTOs.Comment; namespace Diligent.WebAPI.Host.Controllers.V1 { [ApiVersion("1.0")] [Route("v{version:apiVersion}/comments")] [ApiController] public class CommentsController : ControllerBase { private readonly ICommentService _commentService; public CommentsController(ICommentService commentService) { _commentService = commentService; } [Authorize] [HttpPost] public async Task AddComment(CommentCreateDto commentCreateDto) { await _commentService.CreateComment(commentCreateDto); return StatusCode((int)HttpStatusCode.Created); } } }