Write 200 http status codes to restart routes

This commit is contained in:
Quentin McGaw
2020-09-12 18:37:06 +00:00
parent e0e450ca1c
commit cb1520cb18

View File

@@ -69,8 +69,10 @@ func (s *server) makeHandler() http.HandlerFunc {
switch r.RequestURI { switch r.RequestURI {
case "/openvpn/actions/restart": case "/openvpn/actions/restart":
s.restartOpenvpn() s.restartOpenvpn()
w.WriteHeader(http.StatusOK)
case "/unbound/actions/restart": case "/unbound/actions/restart":
s.restartUnbound() s.restartUnbound()
w.WriteHeader(http.StatusOK)
case "/openvpn/portforwarded": case "/openvpn/portforwarded":
s.handleGetPortForwarded(w) s.handleGetPortForwarded(w)
case "/openvpn/settings": case "/openvpn/settings":
@@ -79,6 +81,7 @@ func (s *server) makeHandler() http.HandlerFunc {
s.handleHealth(w) s.handleHealth(w)
case "/updater/restart": case "/updater/restart":
s.restartUpdater() s.restartUpdater()
w.WriteHeader(http.StatusOK)
default: default:
routeDoesNotExist(s.logger, w, r) routeDoesNotExist(s.logger, w, r)
} }