element/server/reload.go

14 lines
258 B
Go
Raw Normal View History

package server
import (
"fmt"
"net/http"
)
func (s *Server) reload(w http.ResponseWriter, r *http.Request) {
if err := s.proxy.Reload(); err != nil {
http.Error(w, fmt.Sprintf("error reloading: %s", err), http.StatusInternalServerError)
return
}
}