From 0fdc5e20c4de901d3042d88ae90a29092932ca92 Mon Sep 17 00:00:00 2001 From: knotteye Date: Wed, 30 Jun 2021 18:13:29 -0500 Subject: return user to catalog when posting from catalog --- main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'main.go') diff --git a/main.go b/main.go index 76da453..6b40399 100644 --- a/main.go +++ b/main.go @@ -393,7 +393,11 @@ func main() { } } - http.Redirect(w, r, Domain + "/" + r.FormValue("boardName"), http.StatusMovedPermanently) + if(r.FormValue("returnTo") == "catalog"){ + http.Redirect(w, r, Domain + "/" + r.FormValue("boardName") + "/catalog", http.StatusMovedPermanently) + } else { + http.Redirect(w, r, Domain + "/" + r.FormValue("boardName"), http.StatusMovedPermanently) + } return } -- cgit v1.2.3