mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-26 11:59:48 +01:00
Fix staticcheck's SA1029
This commit is contained in:
parent
5ce3135f00
commit
f8362a4acb
19 changed files with 152 additions and 57 deletions
|
|
@ -5,6 +5,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/deluan/navidrome/model"
|
||||
"github.com/deluan/navidrome/model/request"
|
||||
"github.com/deluan/navidrome/utils"
|
||||
)
|
||||
|
||||
|
|
@ -52,7 +53,7 @@ func (p *playlists) Create(ctx context.Context, playlistId, name string, ids []s
|
|||
}
|
||||
|
||||
func (p *playlists) getUser(ctx context.Context) string {
|
||||
user, ok := ctx.Value("user").(model.User)
|
||||
user, ok := request.UserFrom(ctx)
|
||||
if ok {
|
||||
return user.UserName
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue