public static void SaveArticleText(string articleNumber, string text, ArticleStruct articleStruct) { TimezoneUtil.ConvertArticleDatesToServerTimezone(articleStruct); using (var client = new HttpClient(_handler, false)) { var article = new SaveArticleText() { ArticleNumber = articleNumber, ArticleData = articleStruct, WordText = text }; var response = client.PostAsJsonAsync($"{$"{Constants.EDITOR_ENVIRONMENT_SERVERURL}" + "/api/"}SaveArticleText", article).Result; TimezoneUtil.ConvertArticleDatesToLocalTimezone(articleStruct); } }
public void Post([FromBody] SaveArticleText content) { ArticleItem article = _articleUtil.GetArticleByNumber(content.ArticleNumber); _sitecoreSaverUtil.SaveArticleDetailsAndText(article, content.WordText, content.ArticleData); }