1
0

Vikunja now uses viper to handle config

This commit is contained in:
konrad
2018-09-08 13:29:35 +02:00
parent 4f3e016751
commit 427f752990
13 changed files with 256 additions and 109 deletions

View File

@ -34,6 +34,7 @@ import (
apiv1 "code.vikunja.io/api/routes/api/v1"
_ "code.vikunja.io/api/routes/api/v1/swagger" // for docs generation
"code.vikunja.io/api/routes/crud"
"github.com/spf13/viper"
)
// NewEcho registers a new Echo instance
@ -67,7 +68,7 @@ func RegisterRoutes(e *echo.Echo) {
// ===== Routes with Authetification =====
// Authetification
a.Use(middleware.JWT(models.Config.JWTLoginSecret))
a.Use(middleware.JWT([]byte(viper.GetString("service.JWTSecret"))))
a.POST("/tokenTest", apiv1.CheckToken)
listHandler := &crud.WebHandler{