cms icon indicating copy to clipboard operation
cms copied to clipboard

新版本v7.4的BUG:POST /api/v1/contents/{siteId}/{channelId}/{id}/actions/update 修改内容API运行后无效?

Open mahui-cn opened this issue 1 month ago • 0 comments

我升级到v7.4版本后,这个API执行无效,之前v7.3运行正常。

具体API是: POST /api/v1/contents/{siteId}/{channelId}/{id}/actions/update 我调用的代码:

int id = int.Parse(jPheno["id"].ToString());
JObject jParamUpdate = new JObject{
  { “commonY”, yHaploRatioList != null ? JArray.FromObject(yHaploRatioList) : new JArray() },
  { "commonMt", mtHaploRatioList != null ? JArray.FromObject(mtHaploRatioList) : new JArray() },
  { "isChecked", true }
};

using (HttpResponseMessage response = await CMSService.httpClient.PostAsJsonAsync(string.Format(CMSOptions.UpdateContentApi, CMSOptions.GeneUSiteID, CMSOptions.PhenoChannelID, id), jParamUpdate))
{
  response.EnsureSuccessStatusCode();
}

跟踪调试时,response.EnsureSuccessStatusCode(); 返回 http 200 OK,但实际没有更新数据库。

mahui-cn avatar Dec 06 '25 17:12 mahui-cn