]> granicus.if.org Git - icinga2/commitdiff
Remove obsolete checks from API actions
authorMichael Friedrich <michael.friedrich@netways.de>
Tue, 10 Nov 2015 15:12:50 +0000 (16:12 +0100)
committerMichael Friedrich <michael.friedrich@netways.de>
Tue, 10 Nov 2015 15:13:14 +0000 (16:13 +0100)
refs #10561

lib/icinga/apiactions.cpp

index 9ce515edd63c34d060a05cb41fee7bc4e6205384..f69908b608030f43baca43e8544aa2c8e58e0ddb 100644 (file)
@@ -287,11 +287,6 @@ Dictionary::Ptr ApiActions::RemoveComment(const ConfigObject::Ptr& object,
 
        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 + "'.");
 }
 
@@ -356,11 +351,6 @@ Dictionary::Ptr ApiActions::RemoveDowntime(const ConfigObject::Ptr& object,
 
        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 + "'.");
 }