summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kocoloski <adam@cloudant.com>2010-07-05 17:00:55 -0400
committerAdam Kocoloski <adam@cloudant.com>2010-07-05 17:03:43 -0400
commit8ff2af56e04258a5a8fb3a6c35bb824f0e8b9bc6 (patch)
tree2df5aec4b6c96ef04863d8227176790e446691dd
parent107e7b24b83bdeee98a3b078150921d12875f56b (diff)
move db_path logic to chttpd
-rw-r--r--src/fabric.erl21
1 files changed, 1 insertions, 20 deletions
diff --git a/src/fabric.erl b/src/fabric.erl
index 9be9a26b..21879f43 100644
--- a/src/fabric.erl
+++ b/src/fabric.erl
@@ -16,16 +16,11 @@
get_view_group_info/2]).
% miscellany
--export([db_path/2, design_docs/1, reset_validation_funs/1]).
+-export([design_docs/1, reset_validation_funs/1]).
-include("fabric.hrl").
% db operations
--spec db_path(bstring(), bstring()) -> bstring().
-db_path(RawUri, Customer) ->
- CustomerUri = generate_customer_path(RawUri, Customer),
- {Path, _, _} = mochiweb_util:urlsplit_path(CustomerUri),
- Path.
all_dbs() ->
fabric_all_databases:all_databases("").
@@ -197,17 +192,3 @@ default_callback(Row, Acc) ->
is_reduce_view(_, _, _, #view_query_args{view_type=Reduce}) ->
Reduce =:= reduce.
-
-generate_customer_path("/", _Customer) ->
- "";
-generate_customer_path("/favicon.ico", _Customer) ->
- "favicon.ico";
-generate_customer_path([$/,$_|Rest], _Customer) ->
- lists:flatten([$_|Rest]);
-generate_customer_path([$/|RawPath], Customer) ->
- case Customer of
- "" ->
- RawPath;
- Else ->
- lists:flatten([Else, "%2F", RawPath])
- end.