1
0
Fork 0

renamed to createCollection

This commit is contained in:
Frank Celler 2012-03-18 23:36:55 +01:00
parent d13c6813d0
commit c05a575891
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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)