blob: d77d893cae6142b32d0b97a621e537694dbfa5ae [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#include <token_authorization_middleware.hpp>
9
10#include <fstream>
Ed Tanousba9f9a62017-10-11 16:40:35 -070011#include <streambuf>
12#include <string>
Ed Tanous1abe55e2018-09-05 08:30:59 -070013namespace crow
14{
15namespace redfish
16{
Gunnar Mills1214b7e2020-06-04 10:11:30 -050017template <typename... Middlewares>
18void requestRoutes(Crow<Middlewares...>& app)
Ed Tanous1abe55e2018-09-05 08:30:59 -070019{
20 BMCWEB_ROUTE(app, "/redfish/")
21 .methods("GET"_method)(
22 [](const crow::Request& req, crow::Response& res) {
23 res.jsonValue = {{"v1", "/redfish/v1/"}};
24 res.end();
25 });
Ed Tanous3dac7492017-08-02 13:46:20 -070026}
Ed Tanous1abe55e2018-09-05 08:30:59 -070027} // namespace redfish
28} // namespace crow