mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 02:02:38 +01:00
modules/console: Add key id argument w/ multiline diagnostic to key cmd.
This commit is contained in:
parent
087d13d37e
commit
2ccc8b8be3
1 changed files with 17 additions and 1 deletions
|
@ -7049,7 +7049,7 @@ console_cmd__key(opt &out, const string_view &line)
|
||||||
{
|
{
|
||||||
const params param{line, " ",
|
const params param{line, " ",
|
||||||
{
|
{
|
||||||
"server_name"
|
"server_name", "key_id"
|
||||||
}};
|
}};
|
||||||
|
|
||||||
const auto &server_name
|
const auto &server_name
|
||||||
|
@ -7057,6 +7057,22 @@ console_cmd__key(opt &out, const string_view &line)
|
||||||
param.at("server_name")
|
param.at("server_name")
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const auto &key_id
|
||||||
|
{
|
||||||
|
param["key_id"]
|
||||||
|
};
|
||||||
|
|
||||||
|
if(key_id)
|
||||||
|
{
|
||||||
|
m::keys::get(server_name, key_id, [&out]
|
||||||
|
(const m::keys &keys)
|
||||||
|
{
|
||||||
|
pretty(out, keys) << std::endl;
|
||||||
|
});
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// keys cached for server by param.
|
// keys cached for server by param.
|
||||||
m::keys::cache::for_each(server_name, [&out]
|
m::keys::cache::for_each(server_name, [&out]
|
||||||
(const m::keys &keys)
|
(const m::keys &keys)
|
||||||
|
|
Loading…
Reference in a new issue