Redfish: Fix issue of EventDestination
Fix the bug that can't get/patch/delete EventDestination
Tested: It works good and validation has succeeded.
Signed-off-by: Chicago Duan <duanzhijia01@inspur.com>
Change-Id: Ideb743f9f2a7900a444bc912bfedbb75dfe7c8e7
diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp
index 367b6a2..abc21ec 100644
--- a/redfish-core/lib/event_service.hpp
+++ b/redfish-core/lib/event_service.hpp
@@ -483,7 +483,7 @@
inline void requestRoutesEventDestination(App& app)
{
- BMCWEB_ROUTE(app, "redfish/v1/EventService/Subscriptions/<str>/")
+ BMCWEB_ROUTE(app, "/redfish/v1/EventService/Subscriptions/<str>/")
.privileges({"Login"})
.methods(boost::beast::http::verb::get)(
[](const crow::Request&,
@@ -535,7 +535,7 @@
});
/////redfish/v1/EventService/Subscriptions/
// ConfigureManager
- BMCWEB_ROUTE(app, "redfish/v1/EventService/Subscriptions/<str>/")
+ BMCWEB_ROUTE(app, "/redfish/v1/EventService/Subscriptions/<str>/")
.privileges({"ConfigureManager"})
.methods(boost::beast::http::verb::patch)(
[](const crow::Request& req,
@@ -588,7 +588,7 @@
EventServiceManager::getInstance().updateSubscriptionData();
});
- BMCWEB_ROUTE(app, "redfish/v1/EventService/Subscriptions/<str>/")
+ BMCWEB_ROUTE(app, "/redfish/v1/EventService/Subscriptions/<str>/")
.privileges({"ConfigureManager"})
.methods(boost::beast::http::verb::delete_)(
[](const crow::Request&,