Rename ListenBrainz config flag and enable by default (#1443)

This commit is contained in:
Steve Richter
2021-11-17 21:11:53 -05:00
committed by GitHub
parent da26c5cfe0
commit 3bd6f82c80
8 changed files with 19 additions and 15 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ func serveIndex(ds model.DataStore, fs fs.FS) http.HandlerFunc {
"lastFMEnabled": conf.Server.LastFM.Enabled,
"lastFMApiKey": conf.Server.LastFM.ApiKey,
"devShowArtistPage": conf.Server.DevShowArtistPage,
"devListenBrainzEnabled": conf.Server.DevListenBrainzEnabled,
"listenBrainzEnabled": conf.Server.ListenBrainz.Enabled,
}
auth := handleLoginFromHeaders(ds, r)
if auth != nil {
+3 -3
View File
@@ -266,15 +266,15 @@ var _ = Describe("serveIndex", func() {
Expect(config).To(HaveKeyWithValue("devShowArtistPage", true))
})
It("sets the devListenBrainzEnabled", func() {
conf.Server.DevListenBrainzEnabled = true
It("sets the listenBrainzEnabled", func() {
conf.Server.ListenBrainz.Enabled = true
r := httptest.NewRequest("GET", "/index.html", nil)
w := httptest.NewRecorder()
serveIndex(ds, fs)(w, r)
config := extractAppConfig(w.Body.String())
Expect(config).To(HaveKeyWithValue("devListenBrainzEnabled", true))
Expect(config).To(HaveKeyWithValue("listenBrainzEnabled", true))
})
})