feat: add hostname management and improve error handling

This commit is contained in:
2025-05-03 22:41:21 +02:00
parent 65846a33c0
commit e62bbf8ca3
5 changed files with 121 additions and 3 deletions

View File

@@ -43,6 +43,8 @@ func (s *Server) RegisterRoutes() {
s.router.HandleFunc("/network/up", HandleNetworkUp).Methods(http.MethodPost)
s.router.HandleFunc("/network/down", HandleNetworkDown).Methods(http.MethodPost)
s.router.HandleFunc("/network/remove", HandleNetworkRemove).Methods(http.MethodPost)
s.router.HandleFunc("/hostname", HandleGetHostname).Methods(http.MethodGet)
s.router.HandleFunc("/hostname", HandleSetHostname).Methods(http.MethodPost)
}
func (s *Server) healthHandler(w http.ResponseWriter, r *http.Request) {