fix bag with save uder 00 uuid

This commit is contained in:
valitovgaziz
2024-08-14 11:34:57 +05:00
parent 8ee6e6cd14
commit 413e35101c
+6
View File
@@ -6,6 +6,8 @@ import (
"encoding/json"
"net/http"
"github.com/google/uuid"
"golang.org/x/crypto/bcrypt"
)
@@ -23,7 +25,11 @@ func Register(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusInternalServerError)
return
}
id := uuid.New()
user := models.User{
Id: id,
Name: Crenetials.Name,
Email: Crenetials.Email,
Password: hashedPassword,