summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorILYA Khlopotov <iilyak@apache.org>2018-08-15 07:33:22 -0700
committerILYA Khlopotov <iilyak@apache.org>2018-08-15 15:40:42 -0700
commit9be121334f2eb8d8f4c796eb5e355689d3758129 (patch)
tree039ca2824fe8696e1cd07b0f98e442ae0293d6d7
parent91ff3f69ca1dddc94247b4faf98ccd25eb78a485 (diff)
downloadcouchdb-9be121334f2eb8d8f4c796eb5e355689d3758129.tar.gz
Remove no longer needed handle_restart_req handler
-rw-r--r--src/couch/src/couch_httpd_misc_handlers.erl23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/couch/src/couch_httpd_misc_handlers.erl b/src/couch/src/couch_httpd_misc_handlers.erl
index 0c70bcb8a..3d25f5853 100644
--- a/src/couch/src/couch_httpd_misc_handlers.erl
+++ b/src/couch/src/couch_httpd_misc_handlers.erl
@@ -13,7 +13,7 @@
-module(couch_httpd_misc_handlers).
-export([handle_welcome_req/2,handle_favicon_req/2,handle_utils_dir_req/2,
- handle_all_dbs_req/1,handle_restart_req/1,
+ handle_all_dbs_req/1,
handle_uuids_req/1,handle_config_req/1,
handle_task_status_req/1, handle_file_req/2]).
@@ -81,27 +81,6 @@ handle_task_status_req(Req) ->
send_method_not_allowed(Req, "GET,HEAD").
-handle_restart_req(#httpd{method='GET', path_parts=[_, <<"token">>]}=Req) ->
- ok = couch_httpd:verify_is_server_admin(Req),
- Token = case application:get_env(couch, instance_token) of
- {ok, Tok} ->
- Tok;
- _ ->
- Tok = erlang:phash2(make_ref()),
- application:set_env(couch, instance_token, Tok),
- Tok
- end,
- send_json(Req, 200, {[{token, Token}]});
-handle_restart_req(#httpd{method='POST'}=Req) ->
- couch_httpd:validate_ctype(Req, "application/json"),
- ok = couch_httpd:verify_is_server_admin(Req),
- Result = send_json(Req, 202, {[{ok, true}]}),
- couch:restart(),
- Result;
-handle_restart_req(Req) ->
- send_method_not_allowed(Req, "POST").
-
-
handle_uuids_req(#httpd{method='GET'}=Req) ->
Max = list_to_integer(config:get("uuids","max_count","1000")),
Count = try list_to_integer(couch_httpd:qs_value(Req, "count", "1")) of