Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (route == "machine")
- {
- if (type == "GET")
- {
- jsonObj["data"] = {
- { "machines", {} }
- };
- for(auto& it: machines)
- {
- jsonObj["data"]["machines"][jsonObj["data"]["machines"].size()] = {
- { "id", it.first },
- { "name", std::get<0>(it.second) },
- { "ip", std::get<1>(it.second) },
- { "port", std::get<2>(it.second) },
- { "status", std::get<3>(it.second) },
- { "lastSync", std::get<4>(it.second) }
- };
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement