blob: 52d8c7620f4707718ff66a169749e9eac2fb9f8b [file] [log] [blame]
#pragma once
#include <app.hpp>
#include <http_request.hpp>
#include <http_response.hpp>
#include <string>
namespace redfish
{
inline void redfishGet(App& 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/";
}
inline void requestRoutes(App& app)
{
BMCWEB_ROUTE(app, "/redfish/")
.methods(boost::beast::http::verb::get)(
std::bind_front(redfishGet, std::ref(app)));
}
} // namespace redfish