feat: improve logs, remove config for disable authentication
This commit is contained in:
+2
-5
@@ -7,7 +7,6 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/deluan/navidrome/assets"
|
||||
"github.com/deluan/navidrome/conf"
|
||||
"github.com/deluan/navidrome/model"
|
||||
"github.com/deluan/rest"
|
||||
"github.com/go-chi/chi"
|
||||
@@ -46,10 +45,8 @@ func (app *Router) routes() http.Handler {
|
||||
r.Post("/createAdmin", CreateAdmin(app.ds))
|
||||
|
||||
r.Route("/api", func(r chi.Router) {
|
||||
if !conf.Server.DevDisableAuthentication {
|
||||
r.Use(jwtauth.Verifier(TokenAuth))
|
||||
r.Use(Authenticator(app.ds))
|
||||
}
|
||||
r.Use(jwtauth.Verifier(TokenAuth))
|
||||
r.Use(Authenticator(app.ds))
|
||||
app.R(r, "/user", model.User{})
|
||||
app.R(r, "/song", model.MediaFile{})
|
||||
app.R(r, "/album", model.Album{})
|
||||
|
||||
Reference in New Issue
Block a user