fixes
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good

This commit is contained in:
Scott E. Graves 2025-03-01 07:32:23 -06:00
parent 1d78ee88b8
commit 7d441964e9
2 changed files with 12 additions and 1 deletions

View File

@ -726,7 +726,6 @@ auto app_config::default_data_directory(const provider_type &prov)
-> std::string {
return utils::path::combine(app_config::get_root_data_directory(),
{
REPERTORY_DATA_NAME,
app_config::get_provider_name(prov),
});
}

View File

@ -127,6 +127,18 @@ handlers::handlers(mgmt_app_config *config, httplib::Server *server)
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();
static std::atomic<httplib::Server *> this_server{server_};