rename render -> render_event.go

This commit is contained in:
fiatjaf
2023-10-21 14:10:31 -03:00
parent ebeb9820d8
commit d459769915
2 changed files with 2 additions and 2 deletions

View File

@@ -82,7 +82,7 @@ func main() {
mux.HandleFunc("/try", redirectFromFormSubmit)
mux.HandleFunc("/e/", redirectFromESlash)
mux.HandleFunc("/p/", redirectFromPSlash)
mux.HandleFunc("/", render)
mux.HandleFunc("/", renderEvent)
log.Print("listening at http://0.0.0.0:" + s.Port)
if err := http.ListenAndServe("0.0.0.0:"+s.Port, cors.Default().Handler(mux)); err != nil {

View File

@@ -14,7 +14,7 @@ import (
"github.com/pelletier/go-toml"
)
func render(w http.ResponseWriter, r *http.Request) {
func renderEvent(w http.ResponseWriter, r *http.Request) {
fmt.Println(r.URL.Path, "#/", r.Header.Get("user-agent"))
w.Header().Set("Content-Type", "text/html")