Pass userId explicitly to UserPropsRepository methods

This commit is contained in:
Deluan
2021-06-25 22:21:37 -04:00
parent a1551074bb
commit ee21f3957e
8 changed files with 42 additions and 60 deletions
+3 -3
View File
@@ -159,7 +159,7 @@ func (l *lastfmAgent) callArtistGetTopTracks(ctx context.Context, artistName, mb
}
func (l *lastfmAgent) NowPlaying(ctx context.Context, userId string, track *model.MediaFile) error {
sk, err := l.sessionKeys.get(ctx)
sk, err := l.sessionKeys.get(ctx, userId)
if err != nil {
return err
}
@@ -179,7 +179,7 @@ func (l *lastfmAgent) NowPlaying(ctx context.Context, userId string, track *mode
}
func (l *lastfmAgent) Scrobble(ctx context.Context, userId string, scrobbles []scrobbler.Scrobble) error {
sk, err := l.sessionKeys.get(ctx)
sk, err := l.sessionKeys.get(ctx, userId)
if err != nil {
return err
}
@@ -208,7 +208,7 @@ func (l *lastfmAgent) Scrobble(ctx context.Context, userId string, scrobbles []s
}
func (l *lastfmAgent) IsAuthorized(ctx context.Context, userId string) bool {
sk, err := l.sessionKeys.get(ctx)
sk, err := l.sessionKeys.get(ctx, userId)
return err == nil && sk != ""
}