Bug fixing

This commit is contained in:
Your Name
2025-05-25 12:34:22 +12:00
parent 477d06d3bf
commit 9a0a3076ef

View File

@@ -262,7 +262,11 @@ void Server::handle_get_directory(const httplib::Request& /*req*/, httplib::Resp
nlohmann::json entries_array = nlohmann::json::array();
for (const auto& entry : entries) {
entries_array.push_back({{"label_tag", entry.label_tag}, {"hash", entry.hash}});
for (const auto & label : entry.labels) {
for (const auto & tag : entry.tags) {
entries_array.push_back({{"label_tag", label + ":" + tag}, {"hash", entry.hash}});
}
}
}
nlohmann::json response = {{"result", "success"}, {"entries", entries_array}};