mirror of
https://github.com/Icinga/icinga2.git
synced 2025-09-24 18:28:00 +02:00
Use the right method to get the notification command
This commit is contained in:
parent
932b7162a4
commit
895b587db0
@ -603,7 +603,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