public IActionResult CreateBlog([FromBody] BlogRequestBody blogRequest) { try { _blogDataService.CreateCollectionData(blogRequest.data); var newBlog = new BlogCollection() { UserEmail = blogRequest.UserEmail, BlogName = blogRequest.data.BlogDocument.BlogDetails.Title }; _blogsService.CreateBlog(newBlog); return(NoContent()); } catch (Exception e) { Log.Warning($"Incorred Request - error: {e.Message}"); return(BadRequest(e.Message)); } }