Experimental daemon.
This commit is contained in:
@@ -12,7 +12,7 @@ func (app *App) GetDnsmasqConfigHandler(w http.ResponseWriter, r *http.Request)
|
||||
http.Error(w, "No configuration available. Please configure the system first.", http.StatusPreconditionFailed)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
config := app.DnsmasqManager.Generate(app.Config)
|
||||
w.Header().Set("Content-Type", "text/plain")
|
||||
w.Write([]byte(config))
|
||||
@@ -42,4 +42,4 @@ func (app *App) RestartDnsmasqHandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
json.NewEncoder(w).Encode(map[string]string{"status": "restarted"})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user