Add api for annotations
this only returns the first available annotation for now annotation content is returned in html format, so it can easily be inserted in the frontend displaying the annotation in the frontend is still a TODO
This commit is contained in:
1
main.go
1
main.go
@ -29,6 +29,7 @@ func main() {
|
||||
r.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { render("home", w, nil) })
|
||||
r.HandleFunc("/search", searchHandler).Methods("GET")
|
||||
r.HandleFunc("/{id}-lyrics", lyricsHandler)
|
||||
r.HandleFunc("/{id}/{artist-song}/{verse}/annotations", annotationsHandler)
|
||||
r.HandleFunc("/images/{filename}.{ext}", proxyHandler)
|
||||
r.PathPrefix("/static/").Handler(http.StripPrefix("/static/", http.FileServer(http.Dir("static"))))
|
||||
r.NotFoundHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
|
Reference in New Issue
Block a user