Обновление cpp-сервера

This commit is contained in:
2024-02-21 11:45:29 +03:00
parent 3f65dd50d3
commit 4043250ca5
50 changed files with 597 additions and 358 deletions
@@ -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;
}