diff --git a/api/announcements.go b/api/announcements.go index 5cffff6..a9814d2 100644 --- a/api/announcements.go +++ b/api/announcements.go @@ -25,10 +25,10 @@ func CheckAnn() { } else { log.Println("Announcements disabled") http.HandleFunc("/announcements", func(w http.ResponseWriter, r *http.Request) { - http.Error(w, "Announcements are disabled.", http.StatusNotFound) + http.Error(w, "Announcements are disabled.", http.StatusServiceUnavailable) }) http.HandleFunc("/api/announcements", func(w http.ResponseWriter, r *http.Request) { - http.Error(w, "{\"enabled\": \"false\"}", http.StatusNotFound) + http.Error(w, "{\"enabled\": \"false\"}", http.StatusServiceUnavailable) }) } } diff --git a/api/form.go b/api/form.go index e1181cc..ee0f780 100644 --- a/api/form.go +++ b/api/form.go @@ -27,11 +27,11 @@ func FormCheck() { Form() } else { log.Println("Forms disabled") - http.HandleFunc("/api/form", func(w http.ResponseWriter, r *http.Request) { - io.WriteString(w, "Disabled") - }) http.HandleFunc("/form", func(w http.ResponseWriter, r *http.Request) { - io.WriteString(w, "Disabled") + 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) }) } }