-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Description
Fix the signup.go for correctness, fields, password length, Database errors.
- Steps to reproduce
User not found or DB error: Error 1146 (42S02): Table 'paycard_playground.persons' doesn't exist
// Check if fields is empty
if user.Username == "" || user.CardNumber == "" || user.Password == "" {
h.Tpl.ExecuteTemplate(w, "signup.html", ErrorMessage{Error: "Please check all fields."})
return
}
This should be removed in line 68 - 72// Get form values using User struct
user := User{
Usertype: "Regular",
Username: r.PostFormValue("first_name"),
Fullname: r.PostFormValue("first_name") + " " + r.PostFormValue("last_name"),
CardNumber: r.PostFormValue("card_number"),
Password: r.PostFormValue("password"),
Email: r.PostFormValue("email"),
Phone: r.PostFormValue("contact_number"),
}
Remove unnecessary variable here that not included in frontend side (HTML)-
fix overall signup page for clarity.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request