feat: add protected public web lyrics workflow
This commit is contained in:
1 parent
e71e0c74dd
commit
54167c1b59
13 files changed
+425
-57
No files matched your search
@@ -44,6 +44,9 @@ func (a *localApp) routes() http.Handler {
|
||||
mux.HandleFunc("GET /app", a.withSession(a.appPage))
|
||||
mux.HandleFunc("GET /app.js", a.withSession(a.asset("app.js", "text/javascript; charset=utf-8")))
|
||||
mux.HandleFunc("GET /styles.css", a.withSession(a.asset("styles.css", "text/css; charset=utf-8")))
|
||||
mux.HandleFunc("GET /api/info", a.withSession(func(w http.ResponseWriter, _ *http.Request) {
|
||||
writeJSON(w, http.StatusOK, map[string]any{"mode": "local", "version": version})
|
||||
}))
|
||||
mux.HandleFunc("POST /api/search", a.withSession(a.withAPI(a.search)))
|
||||
mux.HandleFunc("POST /api/lyrics", a.withSession(a.withAPI(a.lyrics)))
|
||||
mux.HandleFunc("GET /health", func(w http.ResponseWriter, _ *http.Request) {
|
||||
|
||||
Reference in new issue
Block a user