From 53841da448baa28067bab046198757954cebc4a1 Mon Sep 17 00:00:00 2001 From: Thibaut Horel Date: Tue, 6 Jun 2017 19:20:09 -0400 Subject: Use user_id instead of lfm_name as much as possible --- web.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'web.go') diff --git a/web.go b/web.go index c9d27b1..032e04a 100644 --- a/web.go +++ b/web.go @@ -20,7 +20,7 @@ type UserInfo struct { type UserSession struct { Id string - UserId int64 + UserId int UserName string } @@ -43,11 +43,7 @@ func (app *App) root(w http.ResponseWriter, r *http.Request) { return } - var lfmName string - row := app.DB.QueryRow("SELECT lfm_name FROM users WHERE user_id=$1", - se.UserId) - row.Scan(&lfmName) - scrobbles := app.RecentScrobbles(lfmName) + scrobbles := app.RecentScrobbles(se.UserId) app.Template.ExecuteTemplate(w, "index.tmpl", struct { Session *UserSession -- cgit v1.2.3-70-g09d2