Keepalive must return an ID to be used with dataProvider.getOne

This commit is contained in:
Deluan 2021-04-26 23:14:28 -04:00 committed by Joe Stump
parent df8357f6b7
commit 10e6fa5404
No known key found for this signature in database
GPG Key ID: 29151C3EC48A0EB9

View File

@ -69,7 +69,9 @@ func (app *Router) routes(path string) http.Handler {
app.addPlaylistTrackRoute(r)
// Keepalive endpoint to be used to keep the session valid (ex: while playing songs)
r.Get("/keepalive/*", func(w http.ResponseWriter, r *http.Request) { _, _ = w.Write([]byte(`{"response":"ok"}`)) })
r.Get("/keepalive/*", func(w http.ResponseWriter, r *http.Request) {
_, _ = w.Write([]byte(`{"response":"ok", "id":"keepalive"}`))
})
if conf.Server.DevActivityPanel {
r.Handle("/events", app.broker)