summaryrefslogtreecommitdiff
path: root/redfish-core
diff options
context:
space:
mode:
Diffstat (limited to 'redfish-core')
-rw-r--r--redfish-core/lib/redfish_sessions.hpp9
-rw-r--r--redfish-core/lib/service_root.hpp10
2 files changed, 17 insertions, 2 deletions
diff --git a/redfish-core/lib/redfish_sessions.hpp b/redfish-core/lib/redfish_sessions.hpp
index 4c989745f2..341e6d001f 100644
--- a/redfish-core/lib/redfish_sessions.hpp
+++ b/redfish-core/lib/redfish_sessions.hpp
@@ -158,7 +158,14 @@ inline void handleSessionCollectionGet(
crow::App& app, const crow::Request& req,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
- handleSessionCollectionHead(app, req, asyncResp);
+ if (!redfish::setUpRedfishRoute(app, req, asyncResp))
+ {
+ return;
+ }
+ asyncResp->res.addHeader(
+ boost::beast::http::field::link,
+ "</redfish/v1/JsonSchemas/SessionCollection.json>; rel=describedby");
+
asyncResp->res.jsonValue["Members"] = getSessionCollectionMembers();
asyncResp->res.jsonValue["Members@odata.count"] =
asyncResp->res.jsonValue["Members"].size();
diff --git a/redfish-core/lib/service_root.hpp b/redfish-core/lib/service_root.hpp
index d94f4468c6..6ae16c3780 100644
--- a/redfish-core/lib/service_root.hpp
+++ b/redfish-core/lib/service_root.hpp
@@ -47,6 +47,10 @@ inline void
inline void handleServiceRootGetImpl(
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
+ asyncResp->res.addHeader(
+ boost::beast::http::field::link,
+ "</redfish/v1/JsonSchemas/ServiceRoot/ServiceRoot.json>; rel=describedby");
+
std::string uuid = persistent_data::getConfig().systemUuid;
asyncResp->res.jsonValue["@odata.type"] =
"#ServiceRoot.v1_15_0.ServiceRoot";
@@ -111,7 +115,11 @@ inline void
handleServiceRootGet(App& app, const crow::Request& req,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
- handleServiceRootHead(app, req, asyncResp);
+ if (!redfish::setUpRedfishRoute(app, req, asyncResp))
+ {
+ return;
+ }
+
handleServiceRootGetImpl(asyncResp);
}