diff --git a/src/mergerfs_webui.cpp b/src/mergerfs_webui.cpp index 35068735..c6deecc0 100644 --- a/src/mergerfs_webui.cpp +++ b/src/mergerfs_webui.cpp @@ -183,10 +183,6 @@ void _get_kvs(const httplib::Request &req_, httplib::Response &res_) { - json j; - std::string mount; - std::map kvs; - if(not req_.has_param("mount")) { res_.status = 400; @@ -194,6 +190,10 @@ _get_kvs(const httplib::Request &req_, return; } + json j; + std::string mount; + std::map kvs; + mount = req_.get_param_value("mount"); mergerfs::api::get_kvs(mount,&kvs);