This commit is contained in:
parent
08f6de0bd7
commit
5e93ecee73
12 changed files with 241 additions and 109 deletions
|
@ -158,12 +158,13 @@ func createLocalUser(w http.ResponseWriter, r *http.Request) {
|
|||
PasskeyId: pkeyId,
|
||||
}
|
||||
if data.Birthday != nil {
|
||||
user.Birthday = sql.NullTime{Valid: true, Time: *data.Birthday}
|
||||
user.Birthday = sql.NullString{Valid: true, String: data.Birthday.Format("2006-Jan-02")}
|
||||
// user.Birthday = sql.NullTime{Valid: true, Time: *data.Birthday}
|
||||
}
|
||||
if data.Location != nil {
|
||||
user.Location = sql.NullString{Valid: true, String: *data.Location}
|
||||
}
|
||||
if err = u.Create(&user); err != nil {
|
||||
if err = query.Create(&user); err != nil {
|
||||
log.Error().Err(err).Msg("failed to create new local user")
|
||||
webutils.ProblemDetailsStatusOnly(w, http.StatusInternalServerError)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue