FloorVisualizer/internal/api/index_handler.go
2026-07-27 15:34:32 +08:00

24 lines
538 B
Go

package api
import "net/http"
func Index(w http.ResponseWriter, r *http.Request) {
if r.URL.Path != "/" {
http.NotFound(w, r)
return
}
w.Header().Set("Content-Type", "text/html; charset=utf-8")
w.WriteHeader(http.StatusOK)
_, _ = w.Write([]byte(indexHTML))
}
func Questionnaire(w http.ResponseWriter, r *http.Request) {
if r.URL.Path != "/questionnaire" {
http.NotFound(w, r)
return
}
w.Header().Set("Content-Type", "text/html; charset=utf-8")
w.WriteHeader(http.StatusOK)
_, _ = w.Write([]byte(questionnaireHTML))
}