mirror of
https://github.com/Icinga/icinga2.git
synced 2025-09-22 17:28:02 +02:00
Unify how to take macros parameter
This commit is contained in:
parent
00a4d2c2eb
commit
20dab6669b
@ -542,8 +542,9 @@ Dictionary::Ptr ApiActions::ExecuteCommand(const ConfigObject::Ptr& object,
|
||||
|
||||
MacroProcessor::ResolverList resolvers;
|
||||
if (params->Contains("macros")) {
|
||||
if (params->Get("macros").IsObjectType<Dictionary>())
|
||||
resolvers.emplace_back("override",HttpUtility::GetLastParameter(params, "macros"));
|
||||
Value macros = HttpUtility::GetLastParameter(params, "macros");
|
||||
if (macros.IsObjectType<Dictionary>())
|
||||
resolvers.emplace_back("override", macros);
|
||||
else
|
||||
return ApiActions::CreateResult(400, "Parameter macros must be a dictionary.");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user