Bug fixing
This commit is contained in:
@@ -260,11 +260,10 @@ void Server::handle_get_directory(const httplib::Request& /*req*/, httplib::Resp
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// output the labeltags as an array of label:tag pairs
|
||||||
nlohmann::json entries_array = nlohmann::json::array();
|
nlohmann::json entries_array = nlohmann::json::array();
|
||||||
for (const auto& entry : entries) {
|
for (const auto& entry : entries) {
|
||||||
for (const auto & labeltag : entry.labeltags) {
|
entries_array.push_back({{"labeltags", entry.labeltags}, {"hash", entry.hash}});
|
||||||
entries_array.push_back({{"labeltag", labeltag}, {"hash", entry.hash}});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nlohmann::json response = {{"result", "success"}, {"entries", entries_array}};
|
nlohmann::json response = {{"result", "success"}, {"entries", entries_array}};
|
||||||
|
Reference in New Issue
Block a user