Move user properties (like session keys) to their own table
This commit is contained in:
@@ -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, userId)
|
||||
sk, err := l.sessionKeys.get(ctx)
|
||||
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, userId)
|
||||
sk, err := l.sessionKeys.get(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -204,7 +204,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, userId)
|
||||
sk, err := l.sessionKeys.get(ctx)
|
||||
return err == nil && sk != ""
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user