From bcd9ed8f2397a5c238b0640aab3ceb9841d96794 Mon Sep 17 00:00:00 2001 From: Adam Kocoloski Date: Fri, 3 Sep 2010 12:45:17 -0400 Subject: support for _view_cleanup via HTTP --- apps/chttpd/src/chttpd_db.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apps/chttpd/src') diff --git a/apps/chttpd/src/chttpd_db.erl b/apps/chttpd/src/chttpd_db.erl index 58897e0a..18bd6f44 100644 --- a/apps/chttpd/src/chttpd_db.erl +++ b/apps/chttpd/src/chttpd_db.erl @@ -118,9 +118,9 @@ handle_compact_req(Req, _) -> Msg = <<"Compaction is handled automatically by Cloudant">>, couch_httpd:send_error(Req, 403, forbidden, Msg). -handle_view_cleanup_req(Req, _) -> - Msg = <<"Old view indices are purged automatically by Cloudant">>, - couch_httpd:send_error(Req, 403, forbidden, Msg). +handle_view_cleanup_req(Req, Db) -> + ok = fabric:cleanup_index_files(Db), + send_json(Req, 202, {[{ok, true}]}). handle_design_req(#httpd{ path_parts=[_DbName, _Design, Name, <<"_",_/binary>> = Action | _Rest], -- cgit v1.2.3