summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kocoloski <adam@cloudant.com>2010-07-02 10:57:45 -0400
committerAdam Kocoloski <adam@cloudant.com>2010-08-12 11:18:47 -0400
commit237b0b07ee225dfee684971a6cb4d1cf691d97b8 (patch)
tree372db5ace2dc6ba0c5c11e0f8faf7ca6761f153e
parente6d7899a6ebf42cd7d65e6ab6da0b6fdbf49647f (diff)
supply proper default values to fabric on db create
-rw-r--r--src/chttpd_db.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/chttpd_db.erl b/src/chttpd_db.erl
index 8a152372..bffc29bf 100644
--- a/src/chttpd_db.erl
+++ b/src/chttpd_db.erl
@@ -151,8 +151,8 @@ handle_design_info_req(Req, _Db, _DDoc) ->
send_method_not_allowed(Req, "GET").
create_db_req(#httpd{user_ctx=UserCtx}=Req, DbName) ->
- N = chttpd:qs_value(Req, "n"),
- Q = chttpd:qs_value(Req, "q"),
+ N = chttpd:qs_value(Req, "n", couch_config:get("cluster", "n", "3")),
+ Q = chttpd:qs_value(Req, "q", couch_config:get("cluster", "q", "8")),
case fabric:create_db(DbName, [{user_ctx, UserCtx},{n,N},{q,Q}]) of
ok ->
DocUrl = absolute_uri(Req, "/" ++ couch_util:url_encode(DbName)),