fuck it, commit to main.

This commit is contained in:
Midou36O 2022-09-13 14:47:10 +01:00
parent f0ed8fbc39
commit cbd31e8893
Signed by: midou
GPG Key ID: 08063D5407090BC2

View File

@ -32,8 +32,8 @@ func handleAnnouncements(w http.ResponseWriter, r *http.Request) {
http.Error(w, "You need to provide the authorization token given to you by your system administrator in order to post an announcement.", http.StatusUnauthorized) http.Error(w, "You need to provide the authorization token given to you by your system administrator in order to post an announcement.", http.StatusUnauthorized)
return return
} else { } else {
if r.FormValue("title") == "" || r.FormValue("link") == "" || r.FormValue("severity") == "" { if r.FormValue("title") == "" || r.FormValue("severity") == "" {
http.Error(w, "Your request is not proper. Please add a title, link, and severity.", http.StatusBadRequest) http.Error(w, "Your request is not proper. Please add a title and severity.", http.StatusBadRequest)
return return
} else { } else {
w.WriteHeader(http.StatusOK) w.WriteHeader(http.StatusOK)