public async Task <IActionResult> PageUpdate([FromBody] CmsPostWebHookApiModel model) { if (model == null) { return(BadRequest("delete model empty or null.")); } var postId = model.post_id; if (postId <= 0) { return(BadRequest($"post id null. model.post_id: {postId}")); } var webHookTypeName = HeaderType(); if (string.IsNullOrEmpty(webHookTypeName) || webHookTypeName != "post_update") { return(BadRequest("no webhook name provided.")); } var apiPath = model.post.post_type; _cmsApiProxy.RemovePageCache(postId); _cmsApiProxy.RemovePagesCache(apiPath); await _cmsApiProxy.GetPage(postId, apiPath); await _cmsApiProxy.GetPages(regionPageApiPath : apiPath); _logger.LogInformation("Cleared and renewed cache for page {PageId} for page api path {ApiPath}.", postId, apiPath); return(Ok()); }