refactor locks

This commit is contained in:
Scott E. Graves 2025-03-25 11:19:20 -05:00
parent ad7a557601
commit 124f17b084

View File

@ -464,8 +464,9 @@ void handlers::handle_get_mount_status(const httplib::Request &req,
auto lines = launch_process(prov, name, {"-status"}); auto lines = launch_process(prov, name, {"-status"});
nlohmann::json result( auto result{
nlohmann::json::parse(utils::string::join(lines, '\n')).at(status_name)); nlohmann::json::parse(utils::string::join(lines, '\n')),
};
if (result.at("Location").get<std::string>().empty()) { if (result.at("Location").get<std::string>().empty()) {
result.at("Location") = config_->get_mount_location(prov, name); result.at("Location") = config_->get_mount_location(prov, name);
} else if (result.at("Active").get<bool>()) { } else if (result.at("Active").get<bool>()) {