changed character limit to backend
All checks were successful
Release / publish (push) Successful in 1m9s

This commit is contained in:
Gian Breitenstein 2024-09-26 18:49:17 +02:00
parent 07084b4e7e
commit 2d50e61403

View File

@ -18,6 +18,11 @@ func main() {
}
func randomNumber(w http.ResponseWriter, r *http.Request) {
name := r.URL.Query().Get("name")
if len(name) > 15 {
w.WriteHeader(400)
return
}
chance, err := strconv.Atoi(r.URL.Query().Get("chance"))
if err != nil {
w.WriteHeader(400)