mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Use the right method to get the notification command
This commit is contained in:
parent
3f1b51b355
commit
7077605880
@ -633,7 +633,7 @@ Dictionary::Ptr ApiActions::ExecuteCommand(const ConfigObject::Ptr& object,
|
||||
if (!EventCommand::GetByName(resolved_command))
|
||||
return ApiActions::CreateResult(400, "Command '" + resolved_command + "' is not of type '" + command_type + "'.");
|
||||
} else if (command_type == "NotificationCommand") {
|
||||
if (!EventCommand::GetByName(resolved_command))
|
||||
if (!NotificationCommand::GetByName(resolved_command))
|
||||
return ApiActions::CreateResult(400, "Command '" + resolved_command + "' is not of type '" + command_type + "'.");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user