Logs new stream sessions

This commit is contained in:
Deluan 2020-04-06 00:26:51 -04:00
parent a17a98a75f
commit 647132625c
2 changed files with 18 additions and 1 deletions

View file

@ -1,6 +1,7 @@
package engine
import (
"context"
"fmt"
"time"
@ -153,3 +154,12 @@ func FromArtists(ars model.Artists) Entries {
}
return entries
}
func userName(ctx context.Context) string {
user := ctx.Value("user")
if user == nil {
return "UNKNOWN"
}
usr := user.(model.User)
return usr.UserName
}