blob: dfdb900b02fc28c944e8b96bc3be74f5567607a8 [file] [log] [blame]
Ed Tanous911ac312017-08-15 09:37:42 -07001#pragma once
2
Ed Tanousc94ad492019-10-10 15:39:33 -07003#include <app.h>
Ed Tanous1abe55e2018-09-05 08:30:59 -07004
5#include <boost/algorithm/string.hpp>
Ed Tanousaa2e59c2018-04-12 12:17:20 -07006#include <dbus_singleton.hpp>
Ed Tanous1abe55e2018-09-05 08:30:59 -07007#include <persistent_data_middleware.hpp>
Gunnar Mills1214b7e2020-06-04 10:11:30 -05008
9#include <fstream>
Ed Tanousba9f9a62017-10-11 16:40:35 -070010#include <streambuf>
11#include <string>
Ed Tanous1abe55e2018-09-05 08:30:59 -070012namespace crow
13{
14namespace redfish
15{
Gunnar Mills1214b7e2020-06-04 10:11:30 -050016template <typename... Middlewares>
17void requestRoutes(Crow<Middlewares...>& app)
Ed Tanous1abe55e2018-09-05 08:30:59 -070018{
19 BMCWEB_ROUTE(app, "/redfish/")
Ed Tanousb41187f2019-10-24 16:30:02 -070020 .methods(boost::beast::http::verb::get)(
Ed Tanous1abe55e2018-09-05 08:30:59 -070021 [](const crow::Request& req, crow::Response& res) {
22 res.jsonValue = {{"v1", "/redfish/v1/"}};
23 res.end();
24 });
Ed Tanous3dac7492017-08-02 13:46:20 -070025}
Ed Tanous1abe55e2018-09-05 08:30:59 -070026} // namespace redfish
27} // namespace crow