示例#1
0
        public async Task <ActionResult <PostCommentDto> > CreateAsync(
            [FromHeader(Name = "userId")] int userId,
            [FromBody] NewCommentDto newCommentDto,
            [FromForm] IFormFile file)
        {
            var entity = await _postCommentService.CreateAndReturnMainCommentAsync(
                newCommentDto,
                userId,
                file);

            return(CreatedAtAction("CreateAsync", entity));
        }