Yes
This commit is contained in:
@@ -43,6 +43,7 @@ func handlerCreateUser(w http.ResponseWriter, r *http.Request) {
|
||||
LastName: "Doe",
|
||||
Email: "john.doe@example.com",
|
||||
Phone: "1234567890",
|
||||
Password: "1234",
|
||||
}
|
||||
|
||||
_, err := DB.NewInsert().Model(user).Exec(context.Background())
|
||||
@@ -79,6 +80,7 @@ func main() {
|
||||
http.HandleFunc("/", handler)
|
||||
|
||||
http.HandleFunc("/user/new", handlerCreateUser)
|
||||
http.HandleFunc("/users/login", HandleLogin)
|
||||
|
||||
fmt.Printf("Serving on port %s\n", port)
|
||||
err = http.ListenAndServe(fmt.Sprintf(":%s", port), nil)
|
||||
|
||||
Reference in New Issue
Block a user