Now index template is a variable.
This commit is contained in:
parent
d3cce3d0cb
commit
74ae6f4213
@ -66,7 +66,7 @@ func (h *RadioHandlers) Index(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
}
|
||||
|
||||
if err := web.Template("index").Execute(w, &IndexData{
|
||||
if err := web.IndexTemplate.Execute(w, &IndexData{
|
||||
MainSite: utils.MainSite(r.Host),
|
||||
Status: status,
|
||||
Songs: songs,
|
||||
@ -117,6 +117,6 @@ func (h *RadioHandlers) LastSong(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
func (h *RadioHandlers) Playlist(w http.ResponseWriter, _ *http.Request) {
|
||||
w.Header().Add("Content-Disposition", "attachment; filename=\"radio.arav.top.m3u\"")
|
||||
fc, _ := web.AssetsGetFile("web/assets/radio.arav.top.m3u")
|
||||
fc, _ := web.AssetsGetFile("radio.arav.top.m3u")
|
||||
w.Write(fc)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user