From 8ff2af56e04258a5a8fb3a6c35bb824f0e8b9bc6 Mon Sep 17 00:00:00 2001 From: Adam Kocoloski Date: Mon, 5 Jul 2010 17:00:55 -0400 Subject: move db_path logic to chttpd --- src/fabric.erl | 21 +-------------------- 1 file changed, 1 insertion(+), 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. -- cgit v1.2.3