Rework how form data is collected for signup
This commit is contained in:
parent
174655a07c
commit
9ce0d02be7
3 changed files with 14 additions and 35 deletions
2
user.go
2
user.go
|
@ -134,7 +134,7 @@ func Signup(w http.ResponseWriter, r *http.Request) {
|
|||
// Check if the request method is POST
|
||||
if r.Method == http.MethodPost {
|
||||
var creds Credentials
|
||||
err := r.ParseForm()
|
||||
err := r.ParseMultipartForm(0)
|
||||
if err != nil {
|
||||
log.Printf("Error parsing form: %v", err)
|
||||
http.Error(w, "Bad Request", http.StatusBadRequest)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue