Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

push validation of userCtx into cttpd layer

  • Loading branch information...
commit fc241da5cd259bcf9bf149b7e4851e3dfa41d812 1 parent 1c4da42
Robert Dionne authored
View
3  .gitignore
@@ -1,3 +1,4 @@
*.beam
.eunit
-ebin/fabric.app
+ebin/fabric.app
+.DS_Store
View
2  src/fabric_db_create.erl
@@ -28,7 +28,7 @@ go(DbName, Options) ->
match ->
Shards = mem3:choose_shards(DbName, Options),
Doc = make_document(Shards),
- Workers = fabric_util:submit_jobs(Shards, create_db, [Options, Doc]),
+ Workers = fabric_util:submit_jobs(Shards, create_db, [Doc]),
Acc0 = fabric_dict:init(Workers, nil),
case fabric_util:recv(Workers, #shard.ref, fun handle_message/3, Acc0) of
{ok, _} ->
View
8 src/fabric_db_delete.erl
@@ -18,9 +18,13 @@
-include("fabric.hrl").
-include_lib("mem3/include/mem3.hrl").
-go(DbName, Options) ->
+%% @doc Options aren't used at all now in couch on delete but are left here
+%% to be consistent with fabric_db_create for possible future use
+%% @see couch_server:delete_db
+%%
+go(DbName, _Options) ->
Shards = mem3:shards(DbName),
- Workers = fabric_util:submit_jobs(Shards, delete_db, [Options, DbName]),
+ Workers = fabric_util:submit_jobs(Shards, delete_db, [DbName]),
Acc0 = fabric_dict:init(Workers, nil),
case fabric_util:recv(Workers, #shard.ref, fun handle_message/3, Acc0) of
{ok, ok} ->
View
10 src/fabric_rpc.erl
@@ -17,7 +17,7 @@
-export([get_db_info/1, get_doc_count/1, get_update_seq/1]).
-export([open_doc/3, open_revs/4, get_missing_revs/2, update_docs/3]).
-export([all_docs/2, changes/3, map_view/4, reduce_view/4, group_info/2]).
--export([create_db/3, delete_db/3, reset_validation_funs/1, set_security/3,
+-export([create_db/2, delete_db/2, reset_validation_funs/1, set_security/3,
set_revs_limit/3]).
-include("fabric.hrl").
@@ -153,18 +153,18 @@ reduce_view(DbName, Group0, ViewName, QueryArgs) ->
end,
rexi:reply(complete).
-create_db(DbName, Options, Doc) ->
+create_db(DbName, Doc) ->
mem3_util:write_db_doc(Doc),
- rexi:reply(case couch_server:create(DbName, Options) of
+ rexi:reply(case couch_server:create(DbName, []) of
{ok, _} ->
ok;
Error ->
Error
end).
-delete_db(DbName, Options, DocId) ->
+delete_db(DbName, DocId) ->
mem3_util:delete_db_doc(DocId),
- rexi:reply(couch_server:delete(DbName, Options)).
+ rexi:reply(couch_server:delete(DbName, [])).
get_db_info(DbName) ->
with_db(DbName, [], {couch_db, get_db_info, []}).
Please sign in to comment.
Something went wrong with that request. Please try again.