From 93a2929059287fb0abe699836d120511f7ba2bf1 Mon Sep 17 00:00:00 2001 From: Emile Date: Sat, 19 Oct 2019 23:43:32 +0200 Subject: added a redirect after a challenge has been edited to /edit --- src/http.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/http.go b/src/http.go index d39b879..8cbcf01 100644 --- a/src/http.go +++ b/src/http.go @@ -189,6 +189,8 @@ func editPostHandler(w http.ResponseWriter, r *http.Request) { // update the challenge in the database editChallengeUUID(r.Form.Get("challengeUUID"), editedChallenge) log.Println("done editing challenge!") + + http.Redirect(w, r, "/edit", http.StatusSeeOther) } // Helper function to host files off of "hosted/" directory -- cgit 1.4.1