This commit is contained in:
parent
1d78ee88b8
commit
7d441964e9
@ -726,7 +726,6 @@ auto app_config::default_data_directory(const provider_type &prov)
|
|||||||
-> std::string {
|
-> std::string {
|
||||||
return utils::path::combine(app_config::get_root_data_directory(),
|
return utils::path::combine(app_config::get_root_data_directory(),
|
||||||
{
|
{
|
||||||
REPERTORY_DATA_NAME,
|
|
||||||
app_config::get_provider_name(prov),
|
app_config::get_provider_name(prov),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -127,6 +127,18 @@ handlers::handlers(mgmt_app_config *config, httplib::Server *server)
|
|||||||
res.status = http_error_codes::ok;
|
res.status = http_error_codes::ok;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
server->Get("/api/v1/mount_status", [](const httplib::Request &req,
|
||||||
|
auto &&res) {
|
||||||
|
auto prov = provider_type_from_string(req.get_param_value("type"));
|
||||||
|
|
||||||
|
auto lines =
|
||||||
|
handlers::read_process(prov, req.get_param_value("name"), "-status");
|
||||||
|
|
||||||
|
auto result = nlohmann::json::parse(utils::string::join(lines, '\n'));
|
||||||
|
res.set_content(result.dump(), "application/json");
|
||||||
|
res.status = http_error_codes::ok;
|
||||||
|
});
|
||||||
|
|
||||||
event_system::instance().start();
|
event_system::instance().start();
|
||||||
|
|
||||||
static std::atomic<httplib::Server *> this_server{server_};
|
static std::atomic<httplib::Server *> this_server{server_};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user