blob: d77d893cae6142b32d0b97a621e537694dbfa5ae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#pragma once
#include <app.h>
#include <boost/algorithm/string.hpp>
#include <dbus_singleton.hpp>
#include <persistent_data_middleware.hpp>
#include <token_authorization_middleware.hpp>
#include <fstream>
#include <streambuf>
#include <string>
namespace crow
{
namespace redfish
{
template <typename... Middlewares>
void requestRoutes(Crow<Middlewares...>& app)
{
BMCWEB_ROUTE(app, "/redfish/")
.methods("GET"_method)(
[](const crow::Request& req, crow::Response& res) {
res.jsonValue = {{"v1", "/redfish/v1/"}};
res.end();
});
}
} // namespace redfish
} // namespace crow
|