Write 200 http status codes to restart routes
This commit is contained in:
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user