mirror of
https://github.com/nxshock/promodj.git
synced 2025-07-05 00:23:11 +05:00
Split site to separate files
This commit is contained in:
parent
a0e0b7b1cc
commit
b0f9ea1f49
7 changed files with 108 additions and 10 deletions
|
@ -7,7 +7,7 @@ import (
|
|||
|
||||
func handleGenres(w http.ResponseWriter, r *http.Request) {
|
||||
if r.RequestURI != "/" {
|
||||
http.Error(w, "not found", http.StatusNotFound)
|
||||
http.FileServer(http.FS(stripSiteFS)).ServeHTTP(w, r)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ func handleGenres(w http.ResponseWriter, r *http.Request) {
|
|||
Domain: r.Host,
|
||||
Genres: Genres}
|
||||
|
||||
err := templates.Lookup("genres.html").Execute(w, data)
|
||||
err := templates.Lookup("index.htm").Execute(w, data)
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue