diff options
Diffstat (limited to 'src/helsinki.at/rhimportd/ctrlWeb.go')
-rw-r--r-- | src/helsinki.at/rhimportd/ctrlWeb.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/helsinki.at/rhimportd/ctrlWeb.go b/src/helsinki.at/rhimportd/ctrlWeb.go index 5a76f15..e5f74b7 100644 --- a/src/helsinki.at/rhimportd/ctrlWeb.go +++ b/src/helsinki.at/rhimportd/ctrlWeb.go @@ -32,17 +32,18 @@ import ( type webHandler struct { *rhimport.Config + *rhimport.RDDB trusted bool - H func(*rhimport.Config, bool, http.ResponseWriter, *http.Request) + H func(*rhimport.Config, *rhimport.RDDB, bool, http.ResponseWriter, *http.Request) } func (self webHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - self.H(self.Config, self.trusted, w, r) + self.H(self.Config, self.RDDB, self.trusted, w, r) } -func StartControlWeb(addr_s string, conf *rhimport.Config) { - http.Handle("/public/simple", webHandler{conf, false, webSimpleHandler}) - http.Handle("/trusted/simple", webHandler{conf, true, webSimpleHandler}) +func StartControlWeb(addr_s string, conf *rhimport.Config, rddb *rhimport.RDDB) { + http.Handle("/public/simple", webHandler{conf, rddb, false, webSimpleHandler}) + http.Handle("/trusted/simple", webHandler{conf, rddb, true, webSimpleHandler}) rhl.Println("listening on", addr_s) http.ListenAndServe(addr_s, nil) |