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( ...@@ -120,7 +120,13 @@ void NFInstanceIDDocumentApiImpl::register_nf_instance(
to_json(json_data, problem_details); to_json(json_data, problem_details);
content_type = "application/problem+json"; content_type = "application/problem+json";
} else { } 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 // Location header
response.headers().add<Pistache::Http::Header::Location>( response.headers().add<Pistache::Http::Header::Location>(
m_address + base + nrf_cfg.sbi_api_version + "/nf-instances/" + m_address + base + nrf_cfg.sbi_api_version + "/nf-instances/" +
...@@ -157,6 +163,7 @@ void NFInstanceIDDocumentApiImpl::update_nf_instance( ...@@ -157,6 +163,7 @@ void NFInstanceIDDocumentApiImpl::update_nf_instance(
to_json(json_data, problem_details); to_json(json_data, problem_details);
content_type = "application/problem+json"; content_type = "application/problem+json";
} else if (http_code == HTTP_STATUS_CODE_200_OK) { } else if (http_code == HTTP_STATUS_CODE_200_OK) {
if (profile.get() != nullptr)
// convert the profile to Json // convert the profile to Json
profile.get()->to_json(json_data); 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