mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-04 13:07:36 +03:00
Disable Subsonic Share endpoints if feature is disabled
This commit is contained in:
parent
0c263cf234
commit
39dc9c4310
1 changed files with 10 additions and 6 deletions
|
@ -126,12 +126,6 @@ func (api *Router) routes() http.Handler {
|
||||||
h(r, "getPlayQueue", api.GetPlayQueue)
|
h(r, "getPlayQueue", api.GetPlayQueue)
|
||||||
h(r, "savePlayQueue", api.SavePlayQueue)
|
h(r, "savePlayQueue", api.SavePlayQueue)
|
||||||
})
|
})
|
||||||
r.Group(func(r chi.Router) {
|
|
||||||
h(r, "getShares", api.GetShares)
|
|
||||||
h(r, "createShare", api.CreateShare)
|
|
||||||
h(r, "updateShare", api.UpdateShare)
|
|
||||||
h(r, "deleteShare", api.DeleteShare)
|
|
||||||
})
|
|
||||||
r.Group(func(r chi.Router) {
|
r.Group(func(r chi.Router) {
|
||||||
r.Use(getPlayer(api.players))
|
r.Use(getPlayer(api.players))
|
||||||
h(r, "search2", api.Search2)
|
h(r, "search2", api.Search2)
|
||||||
|
@ -169,6 +163,16 @@ func (api *Router) routes() http.Handler {
|
||||||
h(r, "getInternetRadioStations", api.GetInternetRadios)
|
h(r, "getInternetRadioStations", api.GetInternetRadios)
|
||||||
h(r, "updateInternetRadioStation", api.UpdateInternetRadio)
|
h(r, "updateInternetRadioStation", api.UpdateInternetRadio)
|
||||||
})
|
})
|
||||||
|
if conf.Server.DevEnableShare {
|
||||||
|
r.Group(func(r chi.Router) {
|
||||||
|
h(r, "getShares", api.GetShares)
|
||||||
|
h(r, "createShare", api.CreateShare)
|
||||||
|
h(r, "updateShare", api.UpdateShare)
|
||||||
|
h(r, "deleteShare", api.DeleteShare)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
h501(r, "getShares", "createShare", "updateShare", "deleteShare")
|
||||||
|
}
|
||||||
|
|
||||||
// Not Implemented (yet?)
|
// Not Implemented (yet?)
|
||||||
h501(r, "jukeboxControl")
|
h501(r, "jukeboxControl")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue