Quick fix + Modularity + New form option.
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
@@ -27,8 +27,15 @@ func FormCheck() {
|
||||
http.HandleFunc("/form", func(w http.ResponseWriter, r *http.Request) {
|
||||
http.Error(w, "Form is disabled.", http.StatusServiceUnavailable)
|
||||
})
|
||||
http.HandleFunc("/api/set/form", func(w http.ResponseWriter, r *http.Request) {
|
||||
http.Error(w, "{\"enabled\": \"false\"}", http.StatusServiceUnavailable)
|
||||
})
|
||||
|
||||
} else {
|
||||
FormPage()
|
||||
http.HandleFunc("/api/set/form", func(w http.ResponseWriter, r *http.Request) {
|
||||
http.Error(w, "{\"enabled\": \"true\"}", http.StatusServiceUnavailable)
|
||||
})
|
||||
Form()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user