dict: MVP

This commit is contained in:
Elnu 2023-07-20 19:31:26 -07:00
parent f8ccf62570
commit 01204ffc81
9 changed files with 191 additions and 4 deletions

View file

@ -10,9 +10,10 @@ import (
func GenerateApiSubmit(clients *ClientSet) httputils.Handler {
return httputils.GenerateHandler(
"",
func(w http.ResponseWriter, r *http.Request) {
func(w http.ResponseWriter, r *http.Request) bool {
r.ParseMultipartForm(0)
clients.BroadcastWord(r.FormValue("word"))
return true
},
nil,
[]string{http.MethodPost},