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
diff --git a/redfish-core/lib/redfish_v1.hpp b/redfish-core/lib/redfish_v1.hpp
index 62ec724..b2f308b 100644
--- a/redfish-core/lib/redfish_v1.hpp
+++ b/redfish-core/lib/redfish_v1.hpp
@@ -13,8 +13,12 @@
{
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/";
});
}