mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm блядь
This commit is contained in:
parent
87d180eab1
commit
5d22bef418
1 changed files with 9 additions and 0 deletions
|
|
@ -26,6 +26,15 @@ func handle(w http.ResponseWriter, r *http.Request) {
|
||||||
http.Error(w,"no", http.StatusBadRequest)
|
http.Error(w,"no", http.StatusBadRequest)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
CheckEmail := strings.ContainsAny(data.Email, "@.")
|
||||||
|
if CheckEmail != true {
|
||||||
|
http.Error(w, "incorrect email", http.StatusBadRequest)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if data.Age > 150 {
|
||||||
|
http.Error(w, "old", http.StatusBadRequest)
|
||||||
|
return
|
||||||
|
}
|
||||||
defer r.Body.Close()
|
defer r.Body.Close()
|
||||||
|
|
||||||
setChan <- data
|
setChan <- data
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue