//[ServiceFilter(typeof(ValidationFilterAttribute))] public async Task <IActionResult> CreateItem([FromBody] CreateItemRequestModel model) { var command = _mapper.Map <CreateItemCommand>(model); command.SellerId = HttpContext.GetUserId(); var result = await _mediator.Send(command); return(result != null ? (IActionResult)Ok(result) : BadRequest()); }
public async Task <ActionResult <ItemServiceModelBaseApiResponse> > CreatePost(CreateItemRequestModel model) { ItemRequestModel item = _mapper.Map <ItemRequestModel>(model); using (var client = new OnebrbApi()) { client.BaseUri = new Uri(_apiOptions.BaseAddress, UriKind.Absolute); var response = await client.CreateItemAsync(item); return(response); } }