add getAlbumList2

This commit is contained in:
sentriz
2019-05-15 16:03:31 +01:00
parent 4a5b36ccee
commit 5fae510958
7 changed files with 62 additions and 29 deletions

View File

@@ -1,6 +1,7 @@
package handler
import (
"context"
"crypto/md5"
"encoding/hex"
"fmt"
@@ -75,7 +76,8 @@ func (c *Controller) WithValidSubsonicArgs(next http.HandlerFunc) http.HandlerFu
respondError(w, r, 40, "invalid password")
return
}
next.ServeHTTP(w, r)
withUser := context.WithValue(r.Context(), contextUserKey, user)
next.ServeHTTP(w, r.WithContext(withUser))
}
}