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_,