mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 07:34:15 +02:00
Update status code
This commit is contained in:
parent
cb32786880
commit
edbd8688fb
@ -626,13 +626,13 @@ Dictionary::Ptr ApiActions::ExecuteCommand(const ConfigObject::Ptr& object,
|
|||||||
/* Check if resolved_command exists and it is of type command_type */
|
/* Check if resolved_command exists and it is of type command_type */
|
||||||
if (command_type == "CheckCommand") {
|
if (command_type == "CheckCommand") {
|
||||||
if (!CheckCommand::GetByName(resolved_command))
|
if (!CheckCommand::GetByName(resolved_command))
|
||||||
return ApiActions::CreateResult(400, "Can't find a valid " + command_type + " for '" + resolved_command + "'.");
|
return ApiActions::CreateResult(404, "Can't find a valid " + command_type + " for '" + resolved_command + "'.");
|
||||||
} else if (command_type == "EventCommand") {
|
} else if (command_type == "EventCommand") {
|
||||||
if (!EventCommand::GetByName(resolved_command))
|
if (!EventCommand::GetByName(resolved_command))
|
||||||
return ApiActions::CreateResult(400, "Can't find a valid " + command_type + " for '" + resolved_command + "'.");
|
return ApiActions::CreateResult(404, "Can't find a valid " + command_type + " for '" + resolved_command + "'.");
|
||||||
} else if (command_type == "NotificationCommand") {
|
} else if (command_type == "NotificationCommand") {
|
||||||
if (!NotificationCommand::GetByName(resolved_command))
|
if (!NotificationCommand::GetByName(resolved_command))
|
||||||
return ApiActions::CreateResult(400, "Can't find a valid " + command_type + " for '" + resolved_command + "'.");
|
return ApiActions::CreateResult(404, "Can't find a valid " + command_type + " for '" + resolved_command + "'.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get TTL param */
|
/* Get TTL param */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user