feat: birthday validation integrated into profile

This commit is contained in:
2025-08-03 00:22:01 +03:00
parent 3a63a14c4d
commit b24ffcf3f8
5 changed files with 26 additions and 3 deletions

View File

@@ -35,6 +35,7 @@ import (
"github.com/google/uuid"
"github.com/jackc/pgerrcode"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
"go.uber.org/zap"
)
@@ -437,9 +438,15 @@ func (a *authServiceImpl) RegistrationComplete(cinfo dto.ClientInfo, request mod
return nil, errs.ErrServerError
}
birthdayTimestamp := pgtype.Timestamp {
Time: time.UnixMilli(request.Birthday),
Valid: true,
}
profile, err = db.TXQueries.CreateProfile(db.CTX, database.CreateProfileParams{
UserID: user.ID,
Name: request.Name,
Birthday: birthdayTimestamp,
})
if err != nil {