navidrome/core/common.go
Deluan 9e35534dad Fix lint errors
New environment, forgot to setup it properly...
2020-07-10 13:11:02 -04:00

15 lines
229 B
Go

package core
import (
"context"
"github.com/deluan/navidrome/model/request"
)
func userName(ctx context.Context) string {
if user, ok := request.UserFrom(ctx); !ok {
return "UNKNOWN"
} else {
return user.UserName
}
}