Permalink
Browse files

Support placement param when creating db's

Conflicts:
	src/chttpd_db.erl
  • Loading branch information...
1 parent 64ae378 commit 26bc7f72de206fd61ce5f93db910a784d49884b3 Robert Newson committed Sep 27, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/chttpd_db.erl
View
@@ -171,8 +171,9 @@ create_db_req(#httpd{}=Req, DbName) ->
couch_httpd:verify_is_server_admin(Req),
N = couch_httpd:qs_value(Req, "n", couch_config:get("cluster", "n", "3")),
Q = couch_httpd:qs_value(Req, "q", couch_config:get("cluster", "q", "8")),
+ P = couch_httpd:qs_value(Req, "placement", couch_config:get("cluster", "placement")),
DocUrl = absolute_uri(Req, "/" ++ couch_util:url_encode(DbName)),
- case fabric:create_db(DbName, [{n,N}, {q,Q}]) of
+ case fabric:create_db(DbName, [{n,N}, {q,Q}, {placement,P}]) of
ok ->
send_json(Req, 201, [{"Location", DocUrl}], {[{ok, true}]});
accepted ->

0 comments on commit 26bc7f7

Please sign in to comment.