public async Task <ActionResult> Create([FromForm] PostCreateDto PostCreateDto) { return(await HandleExceptions(async() => { if (ModelState.IsValid) { var hostRoot = _hostServices.GetHostPath(); await _postManager.AddPostAsync(PostCreateDto, hostRoot); return Ok(); } return BadRequest("Model state is not valid"); })); }