From 9a0a3076ef5dcc3ab29a4d9b9b005e22aadde55d Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 25 May 2025 12:34:22 +1200 Subject: [PATCH] Bug fixing --- src/server.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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}};