summaryrefslogtreecommitdiffstats
path: root/web.go
diff options
context:
space:
mode:
Diffstat (limited to 'web.go')
-rw-r--r--web.go8
1 files changed, 2 insertions, 6 deletions
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