Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
oai
cn5g
oai-cn5g-nrf
Commits
14dcfa72
Commit
14dcfa72
authored
Jan 08, 2021
by
Tien-Thinh Nguyen
Browse files
Fix issue for NFUpdate
parent
a1eb161a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/api-server/impl/NFInstanceIDDocumentApiImpl.cpp
View file @
14dcfa72
...
...
@@ -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,8 +163,9 @@ 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
)
{
// convert the profile to Json
profile
.
get
()
->
to_json
(
json_data
);
if
(
profile
.
get
()
!=
nullptr
)
// convert the profile to Json
profile
.
get
()
->
to_json
(
json_data
);
}
Logger
::
nrf_sbi
().
debug
(
"Json data: %s"
,
json_data
.
dump
().
c_str
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment