18 lines
424 B
C++
18 lines
424 B
C++
#include <controllers/statistics/get.h>
|
|
#include <controllers/statistics/details/query.h>
|
|
|
|
using namespace controllers::statistics;
|
|
|
|
Get::Get() : ControllerBase("statistics", "get") {}
|
|
|
|
json Get::operator()(const json& parameters) const {
|
|
auto rows = details::StatisticsQuery();
|
|
|
|
json result;
|
|
for (auto& row : rows) {
|
|
result[std::move(row.name)] = row.value;
|
|
}
|
|
|
|
return result;
|
|
}
|