diff --git a/models/user.go b/models/user.go index 9a82dab..4ba3157 100644 --- a/models/user.go +++ b/models/user.go @@ -39,6 +39,7 @@ type Signup struct { Email string `schema:"email"` Password string `schema:"password"` PasswordRepeat string `schema:"password_repeat"` + Location string `schema:"location"` } type SetPasswordRequest struct { diff --git a/services/user.go b/services/user.go index f8209e2..ca28177 100644 --- a/services/user.go +++ b/services/user.go @@ -76,8 +76,9 @@ func (srv *UserService) Count() (int64, error) { func (srv *UserService) CreateOrGet(signup *models.Signup, isAdmin bool) (*models.User, bool, error) { u := &models.User{ ID: signup.Username, - Email: signup.Email, ApiKey: uuid.NewV4().String(), + Email: signup.Email, + Location: signup.Location, Password: signup.Password, IsAdmin: isAdmin, } diff --git a/views/signup.tpl.html b/views/signup.tpl.html index f474caa..67b3ccf 100644 --- a/views/signup.tpl.html +++ b/views/signup.tpl.html @@ -34,6 +34,8 @@