]> granicus.if.org Git - icinga2/commitdiff
Revert "API: Improve error handling for 'schedule-downtime' action" 7385/head
authorMichael Friedrich <michael.friedrich@icinga.com>
Thu, 1 Aug 2019 12:03:44 +0000 (14:03 +0200)
committerMichael Friedrich <michael.friedrich@icinga.com>
Thu, 1 Aug 2019 12:03:44 +0000 (14:03 +0200)
This reverts commit 8ca38302fceeb05f99c703e1e66b234de996cbd5.

lib/icinga/apiactions.cpp

index 9d7edbcc6f3b11cddb9d7b497b6650e36cebb250..757b37eca68144bbaeaceefbf33a017f249053f9 100644 (file)
@@ -337,16 +337,6 @@ Dictionary::Ptr ApiActions::ScheduleDowntime(const ConfigObject::Ptr& object,
        String comment = HttpUtility::GetLastParameter(params, "comment");
        double startTime = HttpUtility::GetLastParameter(params, "start_time");
        double endTime = HttpUtility::GetLastParameter(params, "end_time");
-       double now = Utility::GetTime();
-
-       if (author.IsEmpty() || comment.IsEmpty())
-               return ApiActions::CreateResult(400, "Options 'author' and 'comment' must not be empty");
-
-       if (startTime < now || endTime < now)
-               return ApiActions::CreateResult(400, "Options 'start_time' and 'end_time' must be greater than current timestamp");
-
-       if (endTime < startTime)
-               return ApiActions::CreateResult(400, "Option 'end_time' must be greater than 'start_time'");
 
        Host::Ptr host;
        Service::Ptr service;