From d7778409a76f3084f1127f475f9647beacdc0428 Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Sat, 3 Jan 2026 18:30:58 -0600 Subject: [PATCH] mergerfs_webui.cpp --- src/mergerfs_webui.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/mergerfs_webui.cpp b/src/mergerfs_webui.cpp index 75c31bca..3331ad8f 100644 --- a/src/mergerfs_webui.cpp +++ b/src/mergerfs_webui.cpp @@ -204,6 +204,32 @@ _get_kvs(const httplib::Request &req_, "application/json"); } +static +void +_get_kv(const httplib::Request &req_, + httplib::Response &res_) +{ + if(not req_.has_param("mount")) + { + res_.status = 400; + res_.set_content("mount param not set", "text/plain"); + return; + } + + json j; + std::string mount; + std::map kvs; + + mount = req_.get_param_value("mount"); + + mergerfs::api::get_kvs(mount,&kvs); + + j = kvs; + + res_.set_content(j.dump(), + "application/json"); +} + static void _post_kvs(const httplib::Request &req_,