about summary refs log tree commit diff
path: root/src/http.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/http.go')
-rw-r--r--src/http.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/http.go b/src/http.go
index 6ba657a..6dd9485 100644
--- a/src/http.go
+++ b/src/http.go
@@ -50,8 +50,14 @@ func createPostHandler(w http.ResponseWriter, r *http.Request) {
 }
 
 func viewGetHandler(w http.ResponseWriter, r *http.Request) {
-	log.Println("ciew GET")
-	readFileToResponse(w, "/view.html")
+	// get all challenges from the db
+	challenges := getAllChallenges(db)
+	for _, chal := range challenges {
+		fmt.Println(chal.name)
+	}
+
+	// read the view.html file and write its content to the response writer
+	//readFileToResponse(w, "/view.html")
 }
 
 func editGetHandler(w http.ResponseWriter, r *http.Request) {