Move user properties (like session keys) to their own table

This commit is contained in:
Deluan
2021-06-23 16:47:32 -04:00
parent 265f33ed9d
commit 5001518260
12 changed files with 248 additions and 46 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, 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 != ""
}