From f5da37b7dfedab40616ba28c73464a6c29420ec8 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Tue, 10 Nov 2015 16:12:50 +0100 Subject: [PATCH] Remove obsolete checks from API actions refs #10561 --- lib/icinga/apiactions.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lib/icinga/apiactions.cpp b/lib/icinga/apiactions.cpp index 9ce515edd..f69908b60 100644 --- a/lib/icinga/apiactions.cpp +++ b/lib/icinga/apiactions.cpp @@ -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 + "'."); } -- 2.40.0