]> granicus.if.org Git - icinga2/commitdiff
Fix wrong query type in modify object api request
authorMichael Friedrich <michael.friedrich@netways.de>
Mon, 28 Sep 2015 17:14:38 +0000 (19:14 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Mon, 28 Sep 2015 17:14:38 +0000 (19:14 +0200)
refs #10212

lib/remote/modifyobjecthandler.cpp

index 2c2ed5a8f1dd9c2d42a3d2a1c152d33d5cb12373..300f451e0726ec6c30db6ef6a460bc37b5592160 100644 (file)
@@ -38,7 +38,7 @@ bool ModifyObjectHandler::HandleRequest(const ApiUser::Ptr& user, HttpRequest& r
        if (request.RequestMethod != "POST")
                return false;
 
-       Type::Ptr type = FilterUtility::TypeFromPluralName(request.RequestUrl->GetPath()[1]);
+       Type::Ptr type = FilterUtility::TypeFromPluralName(request.RequestUrl->GetPath()[2]);
 
        if (!type) {
                HttpUtility::SendJsonError(response, 400, "Invalid type specified.");