diff --git a/main.go b/main.go index 501bb71..607c61f 100644 --- a/main.go +++ b/main.go @@ -42,7 +42,7 @@ func main() { if cfg.DB.Type != "mysql" && cfg.DB.Type != "postgres" { log.Fatalf( - "unknown database type '%s' in config '%s'. Allowed is 'mysql' and 'postgresql'", + "unknown database type '%s' in config '%s'. Allowed is 'mysql' and 'postgres'", cfg.DB.Type, *configPath, ) @@ -64,12 +64,8 @@ func main() { log.Fatalf("could not create server instance: %s", err) return } - s.Register("foobar", func(c *Context, req Request, res *Response) error { - c.Logf(LevelInfo, "I received a request!") - res.AddMessage(LevelInfo, "Is this working?") - res.Result["foo"] = "seems so" - return nil - }) + s.Register("zone_create", zoneCreate) + s.Register("zone_list", zoneList) http.HandleFunc("/dim", s.Handle) log.Fatal(http.ListenAndServe(cfg.Listen, nil))