forked from electricdusk/rushlink
Remove unused newPasteHandlerURLEncoded func; NFC
This commit is contained in:
parent
847fd8072b
commit
a58b9815bc
13
handlers.go
13
handlers.go
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user