get forwarded url

This commit is contained in:
sentriz
2019-04-18 00:02:46 +01:00
parent 6120fc81ef
commit 7dbcb9ec5a
3 changed files with 31 additions and 5 deletions

View File

@@ -50,6 +50,9 @@ func (c *Controller) ServeHome(w http.ResponseWriter, r *http.Request) {
c.DB.Table("albums").Count(&data.AlbumCount)
c.DB.Table("tracks").Count(&data.TrackCount)
c.DB.Find(&data.AllUsers)
var apiKey db.Setting
c.DB.Where("key = ?", "lastfm_api_key").First(&apiKey)
data.CurrentLastFMAPIKey = apiKey.Value
renderTemplate(w, r, "home", &data)
}