public IActionResult AddPostData([FromBody] BlogData data) { try { _blogDataService.AddPost(data.BlogDocument.BlogDetails.Title, data.BlogDocument.Posts[data.BlogDocument.Posts.Length - 1]); return(NoContent()); } catch (Exception e) { Log.Warning($"Request ended with error: {e.Message}"); return(BadRequest(e.Message)); } }