about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-10-19 23:43:32 +0200
committerEmile <hanemile@protonmail.com>2019-10-19 23:43:32 +0200
commit93a2929059287fb0abe699836d120511f7ba2bf1 (patch)
treeaacc32ba350c6e2a93245b230be47efcae0d8b60 /src
parentf3a72cb3f02401273814663edeaba0ea22699ea0 (diff)
added a redirect after a challenge has been edited to /edit
Diffstat (limited to 'src')
-rw-r--r--src/http.go2
1 files changed, 2 insertions, 0 deletions
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