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 {
case "/openvpn/actions/restart":
s.restartOpenvpn()
w.WriteHeader(http.StatusOK)
case "/unbound/actions/restart":
s.restartUnbound()
w.WriteHeader(http.StatusOK)
case "/openvpn/portforwarded":
s.handleGetPortForwarded(w)
case "/openvpn/settings":
@@ -79,6 +81,7 @@ func (s *server) makeHandler() http.HandlerFunc {
s.handleHealth(w)
case "/updater/restart":
s.restartUpdater()
w.WriteHeader(http.StatusOK)
default:
routeDoesNotExist(s.logger, w, r)
}