diff --git a/Doxygen/Examples.AvocadoDB/rest_create-document-new-named-collection b/Doxygen/Examples.AvocadoDB/rest_create-document-new-named-collection index 6731e1ac8b..2a1352cea8 100644 --- a/Doxygen/Examples.AvocadoDB/rest_create-document-new-named-collection +++ b/Doxygen/Examples.AvocadoDB/rest_create-document-new-named-collection @@ -1,4 +1,4 @@ -> curl --data @- -X POST --dump - http://localhost:8529/document?collection=NewCollection&create=true +> curl --data @- -X POST --dump - http://localhost:8529/document?collection=NewCollection&createCollection=true { "Hallo" : "World" } HTTP/1.1 202 Accepted diff --git a/RestHandler/RestDocumentHandler.cpp b/RestHandler/RestDocumentHandler.cpp index 75678f3ba4..1ae4c622df 100644 --- a/RestHandler/RestDocumentHandler.cpp +++ b/RestHandler/RestDocumentHandler.cpp @@ -237,7 +237,7 @@ bool RestDocumentHandler::createDocument () { } // should we create the collection - string createStr = request->value("create", found); + string createStr = request->value("createCollection", found); bool create = found ? StringUtils::boolean(createStr) : false; // find and load collection given by name oder identifier diff --git a/UnitTests/RestDocuments/rest_create-document_spec.rb b/UnitTests/RestDocuments/rest_create-document_spec.rb index ef99460399..631e8c4711 100644 --- a/UnitTests/RestDocuments/rest_create-document_spec.rb +++ b/UnitTests/RestDocuments/rest_create-document_spec.rb @@ -254,7 +254,7 @@ describe AvocadoDB do end it "create the collection and the document" do - cmd = "/document?collection=#{@cn}&create=true" + cmd = "/document?collection=#{@cn}&createCollection=true" body = "{ \"Hallo\" : \"World\" }" doc = AvocadoDB.post(cmd, :body => body)