diff options
| author | jan <jan@ruken.pw> | 2016-10-13 15:00:48 (UTC) |
|---|---|---|
| committer | jan <jan@ruken.pw> | 2016-10-13 15:00:48 (UTC) |
| commit | 7aaf955a8455c6cedd74d7a8e3cda6de8318a0c2 (patch) | |
| tree | 9e00adf3a36d7d3768f95bc6d797131a47733592 | |
| parent | c582d1cd2ff9f0f642ff750c73fc04c962dc5560 (diff) | |
enable_nsa zur config hinzugefuegt
| -rw-r--r-- | grilist/config.go | 1 | ||||
| -rw-r--r-- | main.go | 12 |
2 files changed, 8 insertions, 5 deletions
diff --git a/grilist/config.go b/grilist/config.go index 8798338..c69c873 100644 --- a/grilist/config.go +++ b/grilist/config.go | |||
| @@ -17,6 +17,7 @@ type Config struct { | |||
| 17 | Password string `toml:"password"` | 17 | Password string `toml:"password"` |
| 18 | SSLEnabled bool `toml:ssl_enabled"` | 18 | SSLEnabled bool `toml:ssl_enabled"` |
| 19 | } `toml:"database"` | 19 | } `toml:"database"` |
| 20 | EnableNSA bool `toml:"enable_nsa"` | ||
| 20 | } | 21 | } |
| 21 | 22 | ||
| 22 | func (c *Config) DBConnectionString() string { | 23 | func (c *Config) DBConnectionString() string { |
| @@ -54,11 +54,13 @@ func main() { | |||
| 54 | 54 | ||
| 55 | log.Println("database connection established") | 55 | log.Println("database connection established") |
| 56 | 56 | ||
| 57 | if err := nsa.Init(db); err != nil { | 57 | if config.EnableNSA { |
| 58 | panic(err) | 58 | if err := nsa.Init(db); err != nil { |
| 59 | } | 59 | panic(err) |
| 60 | if err := nsa.SetEvents(eventlogging.Events); err != nil { | 60 | } |
| 61 | panic(err) | 61 | if err := nsa.SetEvents(eventlogging.Events); err != nil { |
| 62 | panic(err) | ||
| 63 | } | ||
| 62 | } | 64 | } |
| 63 | 65 | ||
| 64 | renderer := frontend.New("views") | 66 | renderer := frontend.New("views") |
