change users table
This commit is contained in:
@@ -26,7 +26,7 @@ func NewRepository(client postgresql.Client, logger *logging.Logger) auth.Reposi
|
||||
const (
|
||||
loginQuery = `SELECT id, password FROM users WHERE email = $1`
|
||||
userByIDQuery = `SELECT id, password FROM users WHERE id = $1`
|
||||
profileQuery = `SELECT id, fullname, phone_number, avatar, created_at
|
||||
profileQuery = `SELECT id, name, first_name, last_name, phone, avatar, created_at
|
||||
FROM users WHERE id = $1`
|
||||
)
|
||||
|
||||
@@ -46,8 +46,10 @@ func (r *repository) GetProfile(ctx context.Context, id int) (auth.UserProfileDT
|
||||
var profile auth.UserProfileDTO
|
||||
err := r.client.QueryRow(ctx, profileQuery, id).Scan(
|
||||
&profile.Id,
|
||||
&profile.FullName,
|
||||
&profile.PhoneNumber,
|
||||
&profile.Name,
|
||||
&profile.FirstName,
|
||||
&profile.LastName,
|
||||
&profile.Phone,
|
||||
&profile.Avatar,
|
||||
&profile.CreatedAt,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user