fixes
This commit is contained in:
parent
6e9d509442
commit
b2797e5aef
@ -37,7 +37,7 @@ auto block_cmd(int argc, char **argv, const app_config &cfg) -> int {
|
||||
return 3;
|
||||
}
|
||||
|
||||
auto &server = cfg.server_list.at(utils::string::to_uint64(*idx));
|
||||
const auto &server = cfg.server_list.at(utils::string::to_uint64(*idx));
|
||||
auto record_id = get_arg("-id", argc, argv);
|
||||
if (not record_id.has_value()) {
|
||||
utils::error::handle_error(function_name, "'-id <record id>' is required");
|
||||
|
@ -37,7 +37,7 @@ auto list_cmd(int argc, char **argv, const app_config &cfg) -> int {
|
||||
return 3;
|
||||
}
|
||||
|
||||
auto &server = cfg.server_list.at(utils::string::to_uint64(*idx));
|
||||
const auto &server = cfg.server_list.at(utils::string::to_uint64(*idx));
|
||||
|
||||
utils::error::handle_info(
|
||||
function_name, fmt::format("list queue|{}|{}", server.id, server.url));
|
||||
|
@ -16,7 +16,7 @@ auto show_cmd(int argc, char **argv, const app_config &cfg) -> int {
|
||||
return 3;
|
||||
}
|
||||
|
||||
auto &server = cfg.server_list.at(utils::string::to_uint64(*idx));
|
||||
const auto &server = cfg.server_list.at(utils::string::to_uint64(*idx));
|
||||
auto record_id = get_arg("-id", argc, argv);
|
||||
if (not record_id.has_value()) {
|
||||
utils::error::handle_error(function_name, "'-id <record id>' is required");
|
||||
|
@ -116,7 +116,7 @@ auto create_error_message(std::vector<std::string_view> items) -> std::string {
|
||||
|
||||
auto create_error_message(std::string_view function_name,
|
||||
std::vector<std::string_view> items) -> std::string {
|
||||
items.insert(std::next(items.begin()), function_name);
|
||||
items.insert(items.begin(), function_name);
|
||||
return create_error_message(items);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user