File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -162,14 +162,12 @@ func (TemplateController) RequestTrack(c *gin.Context) {
162162
163163 trackId := c .PostForm ("trackId" )
164164
165+ username := ""
165166 loginSession := authentication .GetValidSessionFromCookie (c )
166- if loginSession == nil || loginSession .User == nil {
167- c .Redirect (http .StatusSeeOther , fmt .Sprintf ("/login?redirectTo=/session/view/%s" , joinId ))
168- return
167+ if loginSession != nil && loginSession .User != nil {
168+ username = loginSession .User .SpotifyDisplayName
169169 }
170170
171- username := loginSession .User .SpotifyDisplayName
172-
173171 _ , spotifeteError := listeningSession .RequestSong (* session , trackId , username )
174172 if spotifeteError == nil {
175173 c .Redirect (http .StatusSeeOther , "/session/view/" + joinId )
You can’t perform that action at this time.
0 commit comments