fuck it, commit to main.
This commit is contained in:
parent
f0ed8fbc39
commit
cbd31e8893
@ -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)
|
||||||
|
Reference in New Issue
Block a user