Skip to content

Commit f001640

Browse files
Refactor method result creation
1 parent e9306f2 commit f001640

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Development/nmos/configuration_api.cpp

+2-5
Original file line numberDiff line numberDiff line change
@@ -504,12 +504,9 @@ namespace nmos
504504
}
505505
else
506506
{
507-
web::json::value response = web::json::value_of({
508-
{ nmos::fields::nc::status, nmos::fields::nc::is_deprecated(property_descriptor) ? nmos::nc_method_status::property_deprecated : nmos::nc_method_status::ok },
509-
{ nmos::fields::nc::value, nc_object.at(nmos::fields::nc::name(property_descriptor)) }
510-
});
507+
web::json::value method_result = details::make_nc_method_result({ nmos::fields::nc::is_deprecated(property_descriptor) ? nmos::nc_method_status::property_deprecated : nmos::nc_method_status::ok }, nc_object.at(nmos::fields::nc::name(property_descriptor)));
511508

512-
set_reply(res, status_codes::OK, response);
509+
set_reply(res, status_codes::OK, method_result);
513510
}
514511
}
515512
else

0 commit comments

Comments
 (0)