1
0
Fork 0
mirror of https://github.com/navidrome/navidrome.git synced 2025-04-05 05:27:37 +03:00
navidrome/core/common.go

15 lines
232 B
Go

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