Commit 14dcfa72 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Fix issue for NFUpdate

parent a1eb161a
......@@ -120,7 +120,13 @@ void NFInstanceIDDocumentApiImpl::register_nf_instance(
to_json(json_data, problem_details);
content_type = "application/problem+json";
} else {
to_json(json_data, nFProfile);
std::shared_ptr<nrf_profile> profile =
m_nrf_app->find_nf_profile(nfInstanceID);
if (profile.get()!=nullptr) {
profile.get()->to_json(json_data);
//to_json(json_data, nFProfile);
}
// Location header
response.headers().add<Pistache::Http::Header::Location>(
m_address + base + nrf_cfg.sbi_api_version + "/nf-instances/" +
......@@ -157,6 +163,7 @@ void NFInstanceIDDocumentApiImpl::update_nf_instance(
to_json(json_data, problem_details);
content_type = "application/problem+json";
} else if (http_code == HTTP_STATUS_CODE_200_OK) {
if (profile.get() != nullptr)
// convert the profile to Json
profile.get()->to_json(json_data);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment