|
|
|
@ -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<std::string,std::string> 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_, |
|
|
|
|