diff options
author | Emile <hanemile@protonmail.com> | 2019-10-19 23:15:58 +0200 |
---|---|---|
committer | Emile <hanemile@protonmail.com> | 2019-10-19 23:15:58 +0200 |
commit | a03aec45993ecf708a5b0401ad87b78902327424 (patch) | |
tree | a973b9945af487a06c6e334f972d3953f0ee8e48 | |
parent | 8bd955855974f1ed5e4038dae76b77d77ac89061 (diff) |
using the dbGetChallengeByUUID function
-rw-r--r-- | src/http.go | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/http.go b/src/http.go index 7be863d..d39b879 100644 --- a/src/http.go +++ b/src/http.go @@ -129,24 +129,14 @@ func editGetHandler(w http.ResponseWriter, r *http.Request) { log.Printf("fetching challenge with the uuid %s", uuid) - //chall := dbGetChallengeByUUID(uuid) - // - // temporary test challenge used while the dbGetChallengeByUUID function - // has not been implemented: - chall := Challenge{ - UUID: uuid, - Name: "random challenge name", - Description: "some bad description", - Flag: "FLAG", - Container: "container-randomchallenge", - Category: "guess", - Points: 100, - Static: false, + chall, err := dbGetChallengeByUUID(uuid) + if err != nil { + log.Println(err) } // define a new template to render the challenges in t := template.New("") - t, err := t.ParseFiles("./hosted/edit_uuid.html") + t, err = t.ParseFiles("./hosted/edit_uuid.html") if err != nil { log.Println(err) return |