some cleanup, attempting to fix htmx bug
Signed-off-by: ari melody <ari@arimelody.me>
This commit is contained in:
parent
c1ff03c4e5
commit
cddd5656f2
4 changed files with 43 additions and 47 deletions
7
main.go
7
main.go
|
@ -85,7 +85,7 @@ func handle_request(writer http.ResponseWriter, req *http.Request) {
|
|||
return index_handler(writer, root)
|
||||
}
|
||||
|
||||
if uri == "/music" {
|
||||
if uri == "/music" || uri == "/music/" {
|
||||
return music_directory_handler(writer, root)
|
||||
}
|
||||
|
||||
|
@ -121,11 +121,6 @@ func music_directory_handler(writer http.ResponseWriter, root *template.Template
|
|||
}
|
||||
|
||||
func music_gateway_handler(writer http.ResponseWriter, req *http.Request, root *template.Template) int {
|
||||
if len(req.URL.Path) <= len("/music/") {
|
||||
http.Error(writer, "400 bad request", http.StatusBadRequest)
|
||||
return 400
|
||||
}
|
||||
|
||||
id := req.URL.Path[len("/music/"):]
|
||||
// http.Redirect(writer, req, "https://mellodoot.com/music/"+title, 302)
|
||||
// return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue