Fix EventService Subscriptions URI
GET on subscriptions URI returns NotFound error
this commit fixes URI issues
Tested by:
GET https://${bmc}/redfish/v1/EventService/Subscriptions/3800595217
Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
Change-Id: I2952694e4786dc78248335559c8aec795bfabd6e
diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp
index 1330438..98c67c6 100644
--- a/redfish-core/lib/event_service.hpp
+++ b/redfish-core/lib/event_service.hpp
@@ -488,7 +488,7 @@
inline void requestRoutesEventDestination(App& app)
{
- BMCWEB_ROUTE(app, "redfish/v1/EventService/Subscriptions/<str>/")
+ BMCWEB_ROUTE(app, "/redfish/v1/EventService/Subscriptions/<str>/")
.privileges(redfish::privileges::getEventDestination)
.methods(boost::beast::http::verb::get)(
[](const crow::Request&,
@@ -540,7 +540,7 @@
});
/////redfish/v1/EventService/Subscriptions/
// ConfigureManager
- BMCWEB_ROUTE(app, "redfish/v1/EventService/Subscriptions/<str>/")
+ BMCWEB_ROUTE(app, "/redfish/v1/EventService/Subscriptions/<str>/")
// The below privilege is wrong, it should be ConfigureManager OR
// ConfigureSelf
// TODO(ed) follow up with DMTF spec and understand ConfigureSelf
@@ -597,7 +597,7 @@
EventServiceManager::getInstance().updateSubscriptionData();
});
- BMCWEB_ROUTE(app, "redfish/v1/EventService/Subscriptions/<str>/")
+ BMCWEB_ROUTE(app, "/redfish/v1/EventService/Subscriptions/<str>/")
// The below privilege is wrong, it should be ConfigureManager OR
// ConfigureSelf
//.privileges(redfish::privileges::deleteEventDestination)