Skip to content

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

@mahui-cn

Description

@mahui-cn

我升级到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,但实际没有更新数据库。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions