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