typo: Rename to HealthHandler

Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
Julien Riou 2025-08-24 14:57:43 +02:00
parent beabdd5749
commit 711327390f
Signed by: jriou
GPG key ID: 9A099EDA51316854

View file

@ -66,7 +66,7 @@ func WriteError(w http.ResponseWriter, message string, err error) {
}.ToJSON())
}
func HeathHandler(w http.ResponseWriter, r *http.Request) {
func HealthHandler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "OK")
}
@ -313,7 +313,7 @@ func (s *Server) Start() error {
r := mux.NewRouter().StrictSlash(true)
// API
r.HandleFunc("/health", HeathHandler)
r.HandleFunc("/health", HealthHandler)
r.Path("/api/note").Handler(&CreateNoteHandler{logger: s.logger, db: s.db, maxUploadSize: s.config.MaxUploadSize}).Methods("POST")
r.Path("/{id:[a-zA-Z0-9]+}/{password:[a-zA-Z0-9]+}").Handler(&GetProtectedNoteHandler{logger: s.logger, db: s.db}).Methods("GET")
r.Path("/{id:[a-zA-Z0-9]+}").Handler(&GetNoteHandler{logger: s.logger, db: s.db}).Methods("GET")