diff --git a/src/server.cpp b/src/server.cpp index a6bcccc..a83a628 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -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}};