summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-05-12 00:31:08 +0300
committerEd Tanous <edtanous@google.com>2022-05-13 03:54:37 +0300
commit1e925c84be9c1786843e21077ac94a125ac1aa86 (patch)
tree4b7958eff3b1a12819122ec546a1e1353b9e37cf
parent565dfb6f9a87e15fa707e6b2c89222c4419e7491 (diff)
downloadbmcweb-1e925c84be9c1786843e21077ac94a125ac1aa86.tar.xz
Add setUpRedfishRoute to /redfish/ route
Because this file originally wasn't in redfish-core when we handled this site-wide change, it didn't get the additional redfish decorators added to it. This commit adds it. Tested: curl /redfish returns as before. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I89a01a8fd75ab081d031de34ced6c9ae9c0ca75a
-rw-r--r--redfish-core/lib/redfish_v1.hpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/redfish-core/lib/redfish_v1.hpp b/redfish-core/lib/redfish_v1.hpp
index 62ec724a03..b2f308b8e8 100644
--- a/redfish-core/lib/redfish_v1.hpp
+++ b/redfish-core/lib/redfish_v1.hpp
@@ -13,8 +13,12 @@ inline void requestRoutes(App& app)
{
BMCWEB_ROUTE(app, "/redfish/")
.methods(boost::beast::http::verb::get)(
- [](const crow::Request&,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
+ [&app](const crow::Request& req,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
+ if (!redfish::setUpRedfishRoute(app, req, asyncResp->res))
+ {
+ return;
+ }
asyncResp->res.jsonValue["v1"] = "/redfish/v1/";
});
}