From f2f383bdd0cc7fd3f44de393a5c29f7293e5c02f Mon Sep 17 00:00:00 2001 From: Martin Geno Date: Tue, 17 May 2016 11:07:14 +0200 Subject: [PATCH] api access controll --- main.go | 4 ++-- models/config.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 6dd54a1..d336558 100644 --- a/main.go +++ b/main.go @@ -45,8 +45,8 @@ func main() { if config.Webserver.Enable { router := httprouter.New() - if config.Webserver.Api.NewNode { - api.NewNodes(config,router,"/api/nodess",nodes) + if config.Webserver.Api.NewNodes { + api.NewNodes(config,router,"/api/nodes",nodes) log.Println("api nodes started") } if config.Webserver.Api.Aliases { diff --git a/models/config.go b/models/config.go index b18ba4d..963b4f3 100644 --- a/models/config.go +++ b/models/config.go @@ -22,7 +22,7 @@ type Config struct { Webroot string `yaml:"webroot"` Api struct { Passphrase string `yaml:"passphrase"` - NewNode bool `yaml:"newnode"` + NewNodes bool `yaml:"newnodes"` Aliases bool `yaml:"aliases"` } `yaml:"api"` } `yaml:"webserver"`