diff options
Diffstat (limited to 'src/http.go')
-rw-r--r-- | src/http.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/http.go b/src/http.go index 0095663..0add89e 100644 --- a/src/http.go +++ b/src/http.go @@ -21,7 +21,11 @@ func setupHTTPServer() http.Server { // indexHandler handles the "/" endpoint func indexHandler(w http.ResponseWriter, r *http.Request) { - fmt.Fprintln(w, "This is the index Handler speaking! Prepare to HACK THE PLANET!") + if userFlags == nil { + userFlags = make(map[string]int) + } - // insert scoreboard here + for _, user := range users { + fmt.Fprintf(w, "challengesSolves{name=%s} %d\n", user, userFlags[user]) + } } |