Ed Tanous | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Ed Tanous | 1abe55e | 2018-09-05 08:30:59 -0700 | [diff] [blame] | 3 | #include <crow/app.h> |
| 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 | 911ac31 | 2017-08-15 09:37:42 -0700 | [diff] [blame] | 7 | #include <fstream> |
Ed Tanous | 1abe55e | 2018-09-05 08:30:59 -0700 | [diff] [blame] | 8 | #include <persistent_data_middleware.hpp> |
Ed Tanous | ba9f9a6 | 2017-10-11 16:40:35 -0700 | [diff] [blame] | 9 | #include <streambuf> |
| 10 | #include <string> |
Ed Tanous | 1abe55e | 2018-09-05 08:30:59 -0700 | [diff] [blame] | 11 | #include <token_authorization_middleware.hpp> |
| 12 | namespace crow |
| 13 | { |
| 14 | namespace redfish |
| 15 | { |
Ed Tanous | 1abe55e | 2018-09-05 08:30:59 -0700 | [diff] [blame] | 16 | template <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 Tanous | 3dac749 | 2017-08-02 13:46:20 -0700 | [diff] [blame] | 24 | } |
Ed Tanous | 1abe55e | 2018-09-05 08:30:59 -0700 | [diff] [blame] | 25 | } // namespace redfish |
| 26 | } // namespace crow |