Fix everything odyssey pointed out.
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2022-09-18 17:44:37 +01:00
parent 65d35747fc
commit 1c2e6e3da9
4 changed files with 6 additions and 9 deletions

View File

@@ -26,13 +26,10 @@ func FormCheck() {
FormPage()
Form()
} else {
log.Println("Forms disabled")
log.Println("[Segfautils] Contact form is disabled")
http.HandleFunc("/form", func(w http.ResponseWriter, r *http.Request) {
http.Error(w, "Form is disabled.", http.StatusServiceUnavailable)
})
http.HandleFunc("/api/form", func(w http.ResponseWriter, r *http.Request) {
http.Error(w, "{\"enabled\": \"false\"}", http.StatusServiceUnavailable)
})
}
}