Remove unused newPasteHandlerURLEncoded func; NFC

This commit is contained in:
Daan Sprenkels 2020-05-30 19:29:27 +02:00
parent 847fd8072b
commit a58b9815bc

View File

@ -265,19 +265,6 @@ func (rl *rushlink) newFileUploadPasteHandler(w http.ResponseWriter, r *http.Req
rl.viewActionSuccess(w, r, paste, fu) rl.viewActionSuccess(w, r, paste, fu)
} }
func (rl *rushlink) newPasteHandlerURLEncoded(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) {
if err := r.ParseForm(); err != nil {
next(w, r)
return
}
shorten := r.PostFormValue("shorten")
if shorten == "" {
rl.renderError(w, r, http.StatusBadRequest, "no 'shorten' param given\n")
return
}
rl.newRedirectPasteHandler(w, r, shorten)
}
func (rl *rushlink) newRedirectPasteHandler(w http.ResponseWriter, r *http.Request, rawurl string) { func (rl *rushlink) newRedirectPasteHandler(w http.ResponseWriter, r *http.Request, rawurl string) {
userURL, err := url.Parse(rawurl) userURL, err := url.Parse(rawurl)
if err != nil { if err != nil {