Обновление cpp-сервера
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user