Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Ed Tanous | c94ad49 | 2019-10-10 15:39:33 -0700 | [diff] [blame] | 3 | #include <app.h> |
Ed Tanous | 1abe55e | 2018-09-05 08:30:59 -0700 | [diff] [blame] | 4 | |
| 5 | #include <boost/algorithm/string.hpp> |
Ed Tanous | aa2e59c | 2018-04-12 12:17:20 -0700 | [diff] [blame] | 6 | #include <dbus_singleton.hpp> |
Ed Tanous | 1abe55e | 2018-09-05 08:30:59 -0700 | [diff] [blame] | 7 | #include <persistent_data_middleware.hpp> |
Gunnar Mills | 1214b7e | 2020-06-04 10:11:30 -0500 | [diff] [blame] | 8 | #include <token_authorization_middleware.hpp> |
| 9 | |
| 10 | #include <fstream> |
Ed Tanous | ba9f9a6 | 2017-10-11 16:40:35 -0700 | [diff] [blame] | 11 | #include <streambuf> |
| 12 | #include <string> |
Ed Tanous | 1abe55e | 2018-09-05 08:30:59 -0700 | [diff] [blame] | 13 | namespace crow |
| 14 | { |
| 15 | namespace redfish |
| 16 | { |
Gunnar Mills | 1214b7e | 2020-06-04 10:11:30 -0500 | [diff] [blame] | 17 | template <typename... Middlewares> |
| 18 | void requestRoutes(Crow<Middlewares...>& app) |
Ed Tanous | 1abe55e | 2018-09-05 08:30:59 -0700 | [diff] [blame] | 19 | { |
| 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 Tanous | 3dac749 | 2017-08-02 13:46:20 -0700 | [diff] [blame] | 26 | } |
Ed Tanous | 1abe55e | 2018-09-05 08:30:59 -0700 | [diff] [blame] | 27 | } // namespace redfish |
| 28 | } // namespace crow |