mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 13:45:04 +02:00
parent
5a6f38b044
commit
f5da37b7df
@ -287,11 +287,6 @@ Dictionary::Ptr ApiActions::RemoveComment(const ConfigObject::Ptr& object,
|
|||||||
|
|
||||||
Comment::RemoveComment(commentName);
|
Comment::RemoveComment(commentName);
|
||||||
|
|
||||||
comment = Comment::GetByName(commentName);
|
|
||||||
|
|
||||||
if (comment)
|
|
||||||
return ApiActions::CreateResult(403, "Could not remove comment '" + commentName + "'.");
|
|
||||||
|
|
||||||
return ApiActions::CreateResult(200, "Successfully removed comment '" + commentName + "'.");
|
return ApiActions::CreateResult(200, "Successfully removed comment '" + commentName + "'.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -356,11 +351,6 @@ Dictionary::Ptr ApiActions::RemoveDowntime(const ConfigObject::Ptr& object,
|
|||||||
|
|
||||||
Downtime::RemoveDowntime(downtimeName, true);
|
Downtime::RemoveDowntime(downtimeName, true);
|
||||||
|
|
||||||
downtime = Downtime::GetByName(downtimeName);
|
|
||||||
|
|
||||||
if (downtime)
|
|
||||||
return ApiActions::CreateResult(403, "Could not remove downtime '" + downtimeName + "'.");
|
|
||||||
|
|
||||||
return ApiActions::CreateResult(200, "Successfully removed downtime '" + downtimeName + "'.");
|
return ApiActions::CreateResult(200, "Successfully removed downtime '" + downtimeName + "'.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user