Disable creation of shares when feature is disabled.

Fix https://github.com/navidrome/navidrome/pull/2106#issuecomment-1404731388
This commit is contained in:
Deluan committed 2023-01-26 10:12:52 -05:00
1 parent b825d3cfac
commit e2ea5eba8c
2 files changed
+7 -2

No files matched your search

+3 -1
View File
@@ -45,7 +45,9 @@ func (n *Router) routes() http.Handler {
n.R(r, "/playlist", model.Playlist{}, true)
n.R(r, "/transcoding", model.Transcoding{}, conf.Server.EnableTranscodingConfig)
n.R(r, "/radio", model.Radio{}, true)
n.RX(r, "/share", n.share.NewRepository, true)
if conf.Server.DevEnableShare {
n.RX(r, "/share", n.share.NewRepository, true)
}
n.addPlaylistTrackRoute(r)