blob: f1dbfd26cdfb4f9d411262c9c176b7dbfbb5e863 [file] [log] [blame]
Ed Tanous911ac312017-08-15 09:37:42 -07001#pragma once
2
Ed Tanous1abe55e2018-09-05 08:30:59 -07003#include <crow/app.h>
4
5#include <boost/algorithm/string.hpp>
Ed Tanousaa2e59c2018-04-12 12:17:20 -07006#include <dbus_singleton.hpp>
Ed Tanous911ac312017-08-15 09:37:42 -07007#include <fstream>
Ed Tanous1abe55e2018-09-05 08:30:59 -07008#include <persistent_data_middleware.hpp>
Ed Tanousba9f9a62017-10-11 16:40:35 -07009#include <streambuf>
10#include <string>
Ed Tanous1abe55e2018-09-05 08:30:59 -070011#include <token_authorization_middleware.hpp>
12namespace crow
13{
14namespace redfish
15{
Ed Tanous1abe55e2018-09-05 08:30:59 -070016template <typename... Middlewares> void requestRoutes(Crow<Middlewares...>& app)
17{
18 BMCWEB_ROUTE(app, "/redfish/")
19 .methods("GET"_method)(
20 [](const crow::Request& req, crow::Response& res) {
21 res.jsonValue = {{"v1", "/redfish/v1/"}};
22 res.end();
23 });
Ed Tanous3dac7492017-08-02 13:46:20 -070024}
Ed Tanous1abe55e2018-09-05 08:30:59 -070025} // namespace redfish
26} // namespace crow