From 4b5642ac881c1bed8414e54e7e373afbbf365f7b Mon Sep 17 00:00:00 2001 From: Odyssey Date: Tue, 18 Oct 2022 15:30:03 +0200 Subject: [PATCH] easy merge conflic fix lmfao Signed-off-by: Odyssey --- api/form.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/api/form.go b/api/form.go index c10fb44..65859fb 100644 --- a/api/form.go +++ b/api/form.go @@ -2,10 +2,8 @@ package api import ( "fmt" - "io" "log" "net/http" - "net/url" "text/template" "github.com/ProjectSegfault/segfautils/config" @@ -75,18 +73,10 @@ func theActualFormCode(w http.ResponseWriter, r *http.Request) { } } else { fmt.Fprintf(w, "Thanks for your message, and thanks for doing the captcha!\nPlease ignore how different this page looks to the page you were on earlier. I'll figure it out eventually!\n%#+v", hcaptchaResp) - postData := url.Values{ - "content": {"IP " + utils.GetUserIP(r) + "\nFrom " + r.FormValue("email") + " with feedback type " + r.FormValue("commentType") + ":\n" + "**" + r.FormValue("message") + "**\n https://abuseipdb.com/check/" + utils.GetUserIP(r)}, - } shoutrrr := shoutrrr.Send(config.ShoutrrrURL(), "IP "+utils.GetUserIP(r)+"\nFrom "+r.FormValue("email")+" with feedback type "+r.FormValue("commentType")+":\n"+"**"+r.FormValue("message")+"**\n https://abuseipdb.com/check/"+utils.GetUserIP(r)) if shoutrrr != nil { log.Fatal("Something went terribly wrong!", shoutrrr) } - req, err := http.PostForm(webhookURL, postData) - if err != nil { - log.Fatal("Something went terribly wrong!", err) - } - fmt.Fprint(io.Discard, req) // Out with your request! I don't want it. } default: http.Error(w, "Method isn't allowed!\nYou may only POST here, not "+r.Method, http.StatusMethodNotAllowed)