fix: expose profile_completion_percentage in user API responses
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
499c31978c
commit
d3604e9d6b
|
|
@ -159,6 +159,7 @@ RETURNING
|
||||||
phone_verified,
|
phone_verified,
|
||||||
status,
|
status,
|
||||||
profile_completed,
|
profile_completed,
|
||||||
|
profile_completion_percentage,
|
||||||
profile_picture_url,
|
profile_picture_url,
|
||||||
preferred_language,
|
preferred_language,
|
||||||
created_at,
|
created_at,
|
||||||
|
|
@ -213,6 +214,7 @@ SELECT
|
||||||
status,
|
status,
|
||||||
last_login,
|
last_login,
|
||||||
profile_completed,
|
profile_completed,
|
||||||
|
profile_completion_percentage,
|
||||||
profile_picture_url,
|
profile_picture_url,
|
||||||
preferred_language,
|
preferred_language,
|
||||||
created_at,
|
created_at,
|
||||||
|
|
@ -309,6 +311,7 @@ SELECT
|
||||||
phone_verified,
|
phone_verified,
|
||||||
status,
|
status,
|
||||||
profile_completed,
|
profile_completed,
|
||||||
|
profile_completion_percentage,
|
||||||
created_at,
|
created_at,
|
||||||
updated_at
|
updated_at
|
||||||
FROM users
|
FROM users
|
||||||
|
|
@ -425,6 +428,7 @@ SELECT
|
||||||
phone_verified,
|
phone_verified,
|
||||||
status,
|
status,
|
||||||
profile_completed,
|
profile_completed,
|
||||||
|
profile_completion_percentage,
|
||||||
last_login,
|
last_login,
|
||||||
profile_picture_url,
|
profile_picture_url,
|
||||||
preferred_language,
|
preferred_language,
|
||||||
|
|
|
||||||
|
|
@ -340,6 +340,7 @@ RETURNING
|
||||||
phone_verified,
|
phone_verified,
|
||||||
status,
|
status,
|
||||||
profile_completed,
|
profile_completed,
|
||||||
|
profile_completion_percentage,
|
||||||
profile_picture_url,
|
profile_picture_url,
|
||||||
preferred_language,
|
preferred_language,
|
||||||
created_at,
|
created_at,
|
||||||
|
|
@ -375,33 +376,34 @@ type CreateUserParams struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type CreateUserRow struct {
|
type CreateUserRow struct {
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
FirstName pgtype.Text `json:"first_name"`
|
FirstName pgtype.Text `json:"first_name"`
|
||||||
LastName pgtype.Text `json:"last_name"`
|
LastName pgtype.Text `json:"last_name"`
|
||||||
Gender pgtype.Text `json:"gender"`
|
Gender pgtype.Text `json:"gender"`
|
||||||
BirthDay pgtype.Date `json:"birth_day"`
|
BirthDay pgtype.Date `json:"birth_day"`
|
||||||
Email pgtype.Text `json:"email"`
|
Email pgtype.Text `json:"email"`
|
||||||
PhoneNumber pgtype.Text `json:"phone_number"`
|
PhoneNumber pgtype.Text `json:"phone_number"`
|
||||||
Role string `json:"role"`
|
Role string `json:"role"`
|
||||||
AgeGroup pgtype.Text `json:"age_group"`
|
AgeGroup pgtype.Text `json:"age_group"`
|
||||||
EducationLevel pgtype.Text `json:"education_level"`
|
EducationLevel pgtype.Text `json:"education_level"`
|
||||||
Country pgtype.Text `json:"country"`
|
Country pgtype.Text `json:"country"`
|
||||||
Region pgtype.Text `json:"region"`
|
Region pgtype.Text `json:"region"`
|
||||||
NickName pgtype.Text `json:"nick_name"`
|
NickName pgtype.Text `json:"nick_name"`
|
||||||
Occupation pgtype.Text `json:"occupation"`
|
Occupation pgtype.Text `json:"occupation"`
|
||||||
LearningGoal pgtype.Text `json:"learning_goal"`
|
LearningGoal pgtype.Text `json:"learning_goal"`
|
||||||
LanguageGoal pgtype.Text `json:"language_goal"`
|
LanguageGoal pgtype.Text `json:"language_goal"`
|
||||||
LanguageChallange pgtype.Text `json:"language_challange"`
|
LanguageChallange pgtype.Text `json:"language_challange"`
|
||||||
FavouriteTopic pgtype.Text `json:"favourite_topic"`
|
FavouriteTopic pgtype.Text `json:"favourite_topic"`
|
||||||
InitialAssessmentCompleted bool `json:"initial_assessment_completed"`
|
InitialAssessmentCompleted bool `json:"initial_assessment_completed"`
|
||||||
EmailVerified bool `json:"email_verified"`
|
EmailVerified bool `json:"email_verified"`
|
||||||
PhoneVerified bool `json:"phone_verified"`
|
PhoneVerified bool `json:"phone_verified"`
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
ProfileCompleted pgtype.Bool `json:"profile_completed"`
|
ProfileCompleted pgtype.Bool `json:"profile_completed"`
|
||||||
ProfilePictureUrl pgtype.Text `json:"profile_picture_url"`
|
ProfileCompletionPercentage int16 `json:"profile_completion_percentage"`
|
||||||
PreferredLanguage pgtype.Text `json:"preferred_language"`
|
ProfilePictureUrl pgtype.Text `json:"profile_picture_url"`
|
||||||
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
PreferredLanguage pgtype.Text `json:"preferred_language"`
|
||||||
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
||||||
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (CreateUserRow, error) {
|
func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (CreateUserRow, error) {
|
||||||
|
|
@ -457,6 +459,7 @@ func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (CreateU
|
||||||
&i.PhoneVerified,
|
&i.PhoneVerified,
|
||||||
&i.Status,
|
&i.Status,
|
||||||
&i.ProfileCompleted,
|
&i.ProfileCompleted,
|
||||||
|
&i.ProfileCompletionPercentage,
|
||||||
&i.ProfilePictureUrl,
|
&i.ProfilePictureUrl,
|
||||||
&i.PreferredLanguage,
|
&i.PreferredLanguage,
|
||||||
&i.CreatedAt,
|
&i.CreatedAt,
|
||||||
|
|
@ -503,6 +506,7 @@ SELECT
|
||||||
status,
|
status,
|
||||||
last_login,
|
last_login,
|
||||||
profile_completed,
|
profile_completed,
|
||||||
|
profile_completion_percentage,
|
||||||
profile_picture_url,
|
profile_picture_url,
|
||||||
preferred_language,
|
preferred_language,
|
||||||
created_at,
|
created_at,
|
||||||
|
|
@ -578,36 +582,37 @@ type GetAllUsersParams struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetAllUsersRow struct {
|
type GetAllUsersRow struct {
|
||||||
TotalCount int64 `json:"total_count"`
|
TotalCount int64 `json:"total_count"`
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
FirstName pgtype.Text `json:"first_name"`
|
FirstName pgtype.Text `json:"first_name"`
|
||||||
LastName pgtype.Text `json:"last_name"`
|
LastName pgtype.Text `json:"last_name"`
|
||||||
Gender pgtype.Text `json:"gender"`
|
Gender pgtype.Text `json:"gender"`
|
||||||
BirthDay pgtype.Date `json:"birth_day"`
|
BirthDay pgtype.Date `json:"birth_day"`
|
||||||
Email pgtype.Text `json:"email"`
|
Email pgtype.Text `json:"email"`
|
||||||
PhoneNumber pgtype.Text `json:"phone_number"`
|
PhoneNumber pgtype.Text `json:"phone_number"`
|
||||||
Role string `json:"role"`
|
Role string `json:"role"`
|
||||||
AgeGroup pgtype.Text `json:"age_group"`
|
AgeGroup pgtype.Text `json:"age_group"`
|
||||||
EducationLevel pgtype.Text `json:"education_level"`
|
EducationLevel pgtype.Text `json:"education_level"`
|
||||||
Country pgtype.Text `json:"country"`
|
Country pgtype.Text `json:"country"`
|
||||||
Region pgtype.Text `json:"region"`
|
Region pgtype.Text `json:"region"`
|
||||||
KnowledgeLevel pgtype.Text `json:"knowledge_level"`
|
KnowledgeLevel pgtype.Text `json:"knowledge_level"`
|
||||||
NickName pgtype.Text `json:"nick_name"`
|
NickName pgtype.Text `json:"nick_name"`
|
||||||
Occupation pgtype.Text `json:"occupation"`
|
Occupation pgtype.Text `json:"occupation"`
|
||||||
LearningGoal pgtype.Text `json:"learning_goal"`
|
LearningGoal pgtype.Text `json:"learning_goal"`
|
||||||
LanguageGoal pgtype.Text `json:"language_goal"`
|
LanguageGoal pgtype.Text `json:"language_goal"`
|
||||||
LanguageChallange pgtype.Text `json:"language_challange"`
|
LanguageChallange pgtype.Text `json:"language_challange"`
|
||||||
FavouriteTopic pgtype.Text `json:"favourite_topic"`
|
FavouriteTopic pgtype.Text `json:"favourite_topic"`
|
||||||
InitialAssessmentCompleted bool `json:"initial_assessment_completed"`
|
InitialAssessmentCompleted bool `json:"initial_assessment_completed"`
|
||||||
EmailVerified bool `json:"email_verified"`
|
EmailVerified bool `json:"email_verified"`
|
||||||
PhoneVerified bool `json:"phone_verified"`
|
PhoneVerified bool `json:"phone_verified"`
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
LastLogin pgtype.Timestamptz `json:"last_login"`
|
LastLogin pgtype.Timestamptz `json:"last_login"`
|
||||||
ProfileCompleted pgtype.Bool `json:"profile_completed"`
|
ProfileCompleted pgtype.Bool `json:"profile_completed"`
|
||||||
ProfilePictureUrl pgtype.Text `json:"profile_picture_url"`
|
ProfileCompletionPercentage int16 `json:"profile_completion_percentage"`
|
||||||
PreferredLanguage pgtype.Text `json:"preferred_language"`
|
ProfilePictureUrl pgtype.Text `json:"profile_picture_url"`
|
||||||
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
PreferredLanguage pgtype.Text `json:"preferred_language"`
|
||||||
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
||||||
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (q *Queries) GetAllUsers(ctx context.Context, arg GetAllUsersParams) ([]GetAllUsersRow, error) {
|
func (q *Queries) GetAllUsers(ctx context.Context, arg GetAllUsersParams) ([]GetAllUsersRow, error) {
|
||||||
|
|
@ -657,6 +662,7 @@ func (q *Queries) GetAllUsers(ctx context.Context, arg GetAllUsersParams) ([]Get
|
||||||
&i.Status,
|
&i.Status,
|
||||||
&i.LastLogin,
|
&i.LastLogin,
|
||||||
&i.ProfileCompleted,
|
&i.ProfileCompleted,
|
||||||
|
&i.ProfileCompletionPercentage,
|
||||||
&i.ProfilePictureUrl,
|
&i.ProfilePictureUrl,
|
||||||
&i.PreferredLanguage,
|
&i.PreferredLanguage,
|
||||||
&i.CreatedAt,
|
&i.CreatedAt,
|
||||||
|
|
@ -788,6 +794,7 @@ SELECT
|
||||||
phone_verified,
|
phone_verified,
|
||||||
status,
|
status,
|
||||||
profile_completed,
|
profile_completed,
|
||||||
|
profile_completion_percentage,
|
||||||
last_login,
|
last_login,
|
||||||
profile_picture_url,
|
profile_picture_url,
|
||||||
preferred_language,
|
preferred_language,
|
||||||
|
|
@ -805,34 +812,35 @@ type GetUserByEmailPhoneParams struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetUserByEmailPhoneRow struct {
|
type GetUserByEmailPhoneRow struct {
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
FirstName pgtype.Text `json:"first_name"`
|
FirstName pgtype.Text `json:"first_name"`
|
||||||
LastName pgtype.Text `json:"last_name"`
|
LastName pgtype.Text `json:"last_name"`
|
||||||
Gender pgtype.Text `json:"gender"`
|
Gender pgtype.Text `json:"gender"`
|
||||||
BirthDay pgtype.Date `json:"birth_day"`
|
BirthDay pgtype.Date `json:"birth_day"`
|
||||||
Email pgtype.Text `json:"email"`
|
Email pgtype.Text `json:"email"`
|
||||||
PhoneNumber pgtype.Text `json:"phone_number"`
|
PhoneNumber pgtype.Text `json:"phone_number"`
|
||||||
Role string `json:"role"`
|
Role string `json:"role"`
|
||||||
Password []byte `json:"password"`
|
Password []byte `json:"password"`
|
||||||
AgeGroup pgtype.Text `json:"age_group"`
|
AgeGroup pgtype.Text `json:"age_group"`
|
||||||
EducationLevel pgtype.Text `json:"education_level"`
|
EducationLevel pgtype.Text `json:"education_level"`
|
||||||
Country pgtype.Text `json:"country"`
|
Country pgtype.Text `json:"country"`
|
||||||
Region pgtype.Text `json:"region"`
|
Region pgtype.Text `json:"region"`
|
||||||
NickName pgtype.Text `json:"nick_name"`
|
NickName pgtype.Text `json:"nick_name"`
|
||||||
Occupation pgtype.Text `json:"occupation"`
|
Occupation pgtype.Text `json:"occupation"`
|
||||||
LearningGoal pgtype.Text `json:"learning_goal"`
|
LearningGoal pgtype.Text `json:"learning_goal"`
|
||||||
LanguageGoal pgtype.Text `json:"language_goal"`
|
LanguageGoal pgtype.Text `json:"language_goal"`
|
||||||
LanguageChallange pgtype.Text `json:"language_challange"`
|
LanguageChallange pgtype.Text `json:"language_challange"`
|
||||||
FavouriteTopic pgtype.Text `json:"favourite_topic"`
|
FavouriteTopic pgtype.Text `json:"favourite_topic"`
|
||||||
EmailVerified bool `json:"email_verified"`
|
EmailVerified bool `json:"email_verified"`
|
||||||
PhoneVerified bool `json:"phone_verified"`
|
PhoneVerified bool `json:"phone_verified"`
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
ProfileCompleted pgtype.Bool `json:"profile_completed"`
|
ProfileCompleted pgtype.Bool `json:"profile_completed"`
|
||||||
LastLogin pgtype.Timestamptz `json:"last_login"`
|
ProfileCompletionPercentage int16 `json:"profile_completion_percentage"`
|
||||||
ProfilePictureUrl pgtype.Text `json:"profile_picture_url"`
|
LastLogin pgtype.Timestamptz `json:"last_login"`
|
||||||
PreferredLanguage pgtype.Text `json:"preferred_language"`
|
ProfilePictureUrl pgtype.Text `json:"profile_picture_url"`
|
||||||
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
PreferredLanguage pgtype.Text `json:"preferred_language"`
|
||||||
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
||||||
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// -- name: GetUserByUserName :one
|
// -- name: GetUserByUserName :one
|
||||||
|
|
@ -895,6 +903,7 @@ func (q *Queries) GetUserByEmailPhone(ctx context.Context, arg GetUserByEmailPho
|
||||||
&i.PhoneVerified,
|
&i.PhoneVerified,
|
||||||
&i.Status,
|
&i.Status,
|
||||||
&i.ProfileCompleted,
|
&i.ProfileCompleted,
|
||||||
|
&i.ProfileCompletionPercentage,
|
||||||
&i.LastLogin,
|
&i.LastLogin,
|
||||||
&i.ProfilePictureUrl,
|
&i.ProfilePictureUrl,
|
||||||
&i.PreferredLanguage,
|
&i.PreferredLanguage,
|
||||||
|
|
@ -1139,6 +1148,7 @@ SELECT
|
||||||
phone_verified,
|
phone_verified,
|
||||||
status,
|
status,
|
||||||
profile_completed,
|
profile_completed,
|
||||||
|
profile_completion_percentage,
|
||||||
created_at,
|
created_at,
|
||||||
updated_at
|
updated_at
|
||||||
FROM users
|
FROM users
|
||||||
|
|
@ -1160,33 +1170,34 @@ type SearchUserByNameOrPhoneParams struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type SearchUserByNameOrPhoneRow struct {
|
type SearchUserByNameOrPhoneRow struct {
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
FirstName pgtype.Text `json:"first_name"`
|
FirstName pgtype.Text `json:"first_name"`
|
||||||
LastName pgtype.Text `json:"last_name"`
|
LastName pgtype.Text `json:"last_name"`
|
||||||
Gender pgtype.Text `json:"gender"`
|
Gender pgtype.Text `json:"gender"`
|
||||||
BirthDay pgtype.Date `json:"birth_day"`
|
BirthDay pgtype.Date `json:"birth_day"`
|
||||||
Email pgtype.Text `json:"email"`
|
Email pgtype.Text `json:"email"`
|
||||||
PhoneNumber pgtype.Text `json:"phone_number"`
|
PhoneNumber pgtype.Text `json:"phone_number"`
|
||||||
Role string `json:"role"`
|
Role string `json:"role"`
|
||||||
AgeGroup pgtype.Text `json:"age_group"`
|
AgeGroup pgtype.Text `json:"age_group"`
|
||||||
EducationLevel pgtype.Text `json:"education_level"`
|
EducationLevel pgtype.Text `json:"education_level"`
|
||||||
Country pgtype.Text `json:"country"`
|
Country pgtype.Text `json:"country"`
|
||||||
Region pgtype.Text `json:"region"`
|
Region pgtype.Text `json:"region"`
|
||||||
NickName pgtype.Text `json:"nick_name"`
|
NickName pgtype.Text `json:"nick_name"`
|
||||||
Occupation pgtype.Text `json:"occupation"`
|
Occupation pgtype.Text `json:"occupation"`
|
||||||
LearningGoal pgtype.Text `json:"learning_goal"`
|
LearningGoal pgtype.Text `json:"learning_goal"`
|
||||||
LanguageGoal pgtype.Text `json:"language_goal"`
|
LanguageGoal pgtype.Text `json:"language_goal"`
|
||||||
LanguageChallange pgtype.Text `json:"language_challange"`
|
LanguageChallange pgtype.Text `json:"language_challange"`
|
||||||
FavouriteTopic pgtype.Text `json:"favourite_topic"`
|
FavouriteTopic pgtype.Text `json:"favourite_topic"`
|
||||||
InitialAssessmentCompleted bool `json:"initial_assessment_completed"`
|
InitialAssessmentCompleted bool `json:"initial_assessment_completed"`
|
||||||
ProfilePictureUrl pgtype.Text `json:"profile_picture_url"`
|
ProfilePictureUrl pgtype.Text `json:"profile_picture_url"`
|
||||||
PreferredLanguage pgtype.Text `json:"preferred_language"`
|
PreferredLanguage pgtype.Text `json:"preferred_language"`
|
||||||
EmailVerified bool `json:"email_verified"`
|
EmailVerified bool `json:"email_verified"`
|
||||||
PhoneVerified bool `json:"phone_verified"`
|
PhoneVerified bool `json:"phone_verified"`
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
ProfileCompleted pgtype.Bool `json:"profile_completed"`
|
ProfileCompleted pgtype.Bool `json:"profile_completed"`
|
||||||
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
ProfileCompletionPercentage int16 `json:"profile_completion_percentage"`
|
||||||
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
||||||
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (q *Queries) SearchUserByNameOrPhone(ctx context.Context, arg SearchUserByNameOrPhoneParams) ([]SearchUserByNameOrPhoneRow, error) {
|
func (q *Queries) SearchUserByNameOrPhone(ctx context.Context, arg SearchUserByNameOrPhoneParams) ([]SearchUserByNameOrPhoneRow, error) {
|
||||||
|
|
@ -1224,6 +1235,7 @@ func (q *Queries) SearchUserByNameOrPhone(ctx context.Context, arg SearchUserByN
|
||||||
&i.PhoneVerified,
|
&i.PhoneVerified,
|
||||||
&i.Status,
|
&i.Status,
|
||||||
&i.ProfileCompleted,
|
&i.ProfileCompleted,
|
||||||
|
&i.ProfileCompletionPercentage,
|
||||||
&i.CreatedAt,
|
&i.CreatedAt,
|
||||||
&i.UpdatedAt,
|
&i.UpdatedAt,
|
||||||
); err != nil {
|
); err != nil {
|
||||||
|
|
|
||||||
|
|
@ -483,9 +483,10 @@ func (s *Store) GetUserByGoogleID(
|
||||||
PhoneVerified: u.PhoneVerified,
|
PhoneVerified: u.PhoneVerified,
|
||||||
Status: domain.UserStatus(u.Status),
|
Status: domain.UserStatus(u.Status),
|
||||||
|
|
||||||
LastLogin: lastLogin,
|
LastLogin: lastLogin,
|
||||||
ProfileCompleted: u.ProfileCompleted.Bool,
|
ProfileCompleted: u.ProfileCompleted.Bool,
|
||||||
ProfilePictureURL: u.ProfilePictureUrl.String,
|
ProfileCompletionPercentage: int(u.ProfileCompletionPercentage),
|
||||||
|
ProfilePictureURL: u.ProfilePictureUrl.String,
|
||||||
PreferredLanguage: u.PreferredLanguage.String,
|
PreferredLanguage: u.PreferredLanguage.String,
|
||||||
|
|
||||||
CreatedAt: u.CreatedAt.Time,
|
CreatedAt: u.CreatedAt.Time,
|
||||||
|
|
@ -611,9 +612,10 @@ func (s *Store) GetAllUsers(
|
||||||
PhoneVerified: u.PhoneVerified,
|
PhoneVerified: u.PhoneVerified,
|
||||||
Status: domain.UserStatus(u.Status),
|
Status: domain.UserStatus(u.Status),
|
||||||
|
|
||||||
ProfilePictureURL: u.ProfilePictureUrl.String,
|
ProfilePictureURL: u.ProfilePictureUrl.String,
|
||||||
ProfileCompleted: u.ProfileCompleted.Bool,
|
ProfileCompleted: u.ProfileCompleted.Bool,
|
||||||
PreferredLanguage: u.PreferredLanguage.String,
|
ProfileCompletionPercentage: int(u.ProfileCompletionPercentage),
|
||||||
|
PreferredLanguage: u.PreferredLanguage.String,
|
||||||
|
|
||||||
CreatedAt: u.CreatedAt.Time,
|
CreatedAt: u.CreatedAt.Time,
|
||||||
UpdatedAt: updatedAt,
|
UpdatedAt: updatedAt,
|
||||||
|
|
@ -877,8 +879,9 @@ func (s *Store) SearchUserByNameOrPhone(
|
||||||
PhoneVerified: u.PhoneVerified,
|
PhoneVerified: u.PhoneVerified,
|
||||||
Status: domain.UserStatus(u.Status),
|
Status: domain.UserStatus(u.Status),
|
||||||
|
|
||||||
ProfileCompleted: u.ProfileCompleted.Bool,
|
ProfileCompleted: u.ProfileCompleted.Bool,
|
||||||
ProfilePictureURL: u.ProfilePictureUrl.String,
|
ProfileCompletionPercentage: int(u.ProfileCompletionPercentage),
|
||||||
|
ProfilePictureURL: u.ProfilePictureUrl.String,
|
||||||
PreferredLanguage: u.PreferredLanguage.String,
|
PreferredLanguage: u.PreferredLanguage.String,
|
||||||
|
|
||||||
CreatedAt: u.CreatedAt.Time,
|
CreatedAt: u.CreatedAt.Time,
|
||||||
|
|
@ -1103,10 +1106,11 @@ func (s *Store) GetUserByEmailPhone(
|
||||||
PhoneVerified: u.PhoneVerified,
|
PhoneVerified: u.PhoneVerified,
|
||||||
Status: domain.UserStatus(u.Status),
|
Status: domain.UserStatus(u.Status),
|
||||||
|
|
||||||
ProfilePictureURL: u.ProfilePictureUrl.String,
|
ProfilePictureURL: u.ProfilePictureUrl.String,
|
||||||
LastLogin: lastLogin,
|
LastLogin: lastLogin,
|
||||||
ProfileCompleted: u.ProfileCompleted.Bool,
|
ProfileCompleted: u.ProfileCompleted.Bool,
|
||||||
PreferredLanguage: u.PreferredLanguage.String,
|
ProfileCompletionPercentage: int(u.ProfileCompletionPercentage),
|
||||||
|
PreferredLanguage: u.PreferredLanguage.String,
|
||||||
|
|
||||||
CreatedAt: u.CreatedAt.Time,
|
CreatedAt: u.CreatedAt.Time,
|
||||||
UpdatedAt: updatedAt,
|
UpdatedAt: updatedAt,
|
||||||
|
|
@ -1164,8 +1168,9 @@ func mapCreateUserResult(
|
||||||
PhoneVerified: userRes.PhoneVerified,
|
PhoneVerified: userRes.PhoneVerified,
|
||||||
Status: domain.UserStatus(userRes.Status),
|
Status: domain.UserStatus(userRes.Status),
|
||||||
|
|
||||||
ProfileCompleted: userRes.ProfileCompleted.Bool,
|
ProfileCompleted: userRes.ProfileCompleted.Bool,
|
||||||
PreferredLanguage: userRes.PreferredLanguage.String,
|
ProfileCompletionPercentage: int(userRes.ProfileCompletionPercentage),
|
||||||
|
PreferredLanguage: userRes.PreferredLanguage.String,
|
||||||
|
|
||||||
CreatedAt: userRes.CreatedAt.Time,
|
CreatedAt: userRes.CreatedAt.Time,
|
||||||
UpdatedAt: updatedAt,
|
UpdatedAt: updatedAt,
|
||||||
|
|
@ -1208,8 +1213,9 @@ func mapDBUser(
|
||||||
Status: domain.UserStatus(userRes.Status),
|
Status: domain.UserStatus(userRes.Status),
|
||||||
|
|
||||||
ProfilePictureURL: userRes.ProfilePictureUrl.String,
|
ProfilePictureURL: userRes.ProfilePictureUrl.String,
|
||||||
ProfileCompleted: userRes.ProfileCompleted.Bool,
|
ProfileCompleted: userRes.ProfileCompleted.Bool,
|
||||||
PreferredLanguage: userRes.PreferredLanguage.String,
|
ProfileCompletionPercentage: int(userRes.ProfileCompletionPercentage),
|
||||||
|
PreferredLanguage: userRes.PreferredLanguage.String,
|
||||||
|
|
||||||
CreatedAt: userRes.CreatedAt.Time,
|
CreatedAt: userRes.CreatedAt.Time,
|
||||||
UpdatedAt: updatedAt,
|
UpdatedAt: updatedAt,
|
||||||
|
|
|
||||||
|
|
@ -605,9 +605,10 @@ func (h *Handler) GetAllUsers(c *fiber.Ctx) error {
|
||||||
EmailVerified: u.EmailVerified,
|
EmailVerified: u.EmailVerified,
|
||||||
PhoneVerified: u.PhoneVerified,
|
PhoneVerified: u.PhoneVerified,
|
||||||
Status: u.Status,
|
Status: u.Status,
|
||||||
LastLogin: u.LastLogin,
|
LastLogin: u.LastLogin,
|
||||||
ProfileCompleted: u.ProfileCompleted,
|
ProfileCompleted: u.ProfileCompleted,
|
||||||
ProfilePictureURL: u.ProfilePictureURL,
|
ProfileCompletionPercentage: u.ProfileCompletionPercentage,
|
||||||
|
ProfilePictureURL: u.ProfilePictureURL,
|
||||||
PreferredLanguage: u.PreferredLanguage,
|
PreferredLanguage: u.PreferredLanguage,
|
||||||
CreatedAt: u.CreatedAt,
|
CreatedAt: u.CreatedAt,
|
||||||
UpdatedAt: u.UpdatedAt,
|
UpdatedAt: u.UpdatedAt,
|
||||||
|
|
@ -1496,9 +1497,10 @@ func (h *Handler) GetUserProfile(c *fiber.Ctx) error {
|
||||||
EmailVerified: user.EmailVerified,
|
EmailVerified: user.EmailVerified,
|
||||||
PhoneVerified: user.PhoneVerified,
|
PhoneVerified: user.PhoneVerified,
|
||||||
Status: user.Status,
|
Status: user.Status,
|
||||||
LastLogin: lastLogin,
|
LastLogin: lastLogin,
|
||||||
ProfileCompleted: user.ProfileCompleted,
|
ProfileCompleted: user.ProfileCompleted,
|
||||||
ProfilePictureURL: user.ProfilePictureURL,
|
ProfileCompletionPercentage: user.ProfileCompletionPercentage,
|
||||||
|
ProfilePictureURL: user.ProfilePictureURL,
|
||||||
PreferredLanguage: user.PreferredLanguage,
|
PreferredLanguage: user.PreferredLanguage,
|
||||||
CreatedAt: user.CreatedAt,
|
CreatedAt: user.CreatedAt,
|
||||||
UpdatedAt: user.UpdatedAt,
|
UpdatedAt: user.UpdatedAt,
|
||||||
|
|
@ -1597,9 +1599,10 @@ func (h *Handler) AdminProfile(c *fiber.Ctx) error {
|
||||||
EmailVerified: user.EmailVerified,
|
EmailVerified: user.EmailVerified,
|
||||||
PhoneVerified: user.PhoneVerified,
|
PhoneVerified: user.PhoneVerified,
|
||||||
Status: user.Status,
|
Status: user.Status,
|
||||||
LastLogin: lastLogin,
|
LastLogin: lastLogin,
|
||||||
ProfileCompleted: user.ProfileCompleted,
|
ProfileCompleted: user.ProfileCompleted,
|
||||||
ProfilePictureURL: user.ProfilePictureURL,
|
ProfileCompletionPercentage: user.ProfileCompletionPercentage,
|
||||||
|
ProfilePictureURL: user.ProfilePictureURL,
|
||||||
PreferredLanguage: user.PreferredLanguage,
|
PreferredLanguage: user.PreferredLanguage,
|
||||||
CreatedAt: user.CreatedAt,
|
CreatedAt: user.CreatedAt,
|
||||||
UpdatedAt: user.UpdatedAt,
|
UpdatedAt: user.UpdatedAt,
|
||||||
|
|
@ -1750,9 +1753,10 @@ func (h *Handler) SearchUserByNameOrPhone(c *fiber.Ctx) error {
|
||||||
EmailVerified: user.EmailVerified,
|
EmailVerified: user.EmailVerified,
|
||||||
PhoneVerified: user.PhoneVerified,
|
PhoneVerified: user.PhoneVerified,
|
||||||
Status: user.Status,
|
Status: user.Status,
|
||||||
LastLogin: lastLogin,
|
LastLogin: lastLogin,
|
||||||
ProfileCompleted: user.ProfileCompleted,
|
ProfileCompleted: user.ProfileCompleted,
|
||||||
ProfilePictureURL: user.ProfilePictureURL,
|
ProfileCompletionPercentage: user.ProfileCompletionPercentage,
|
||||||
|
ProfilePictureURL: user.ProfilePictureURL,
|
||||||
PreferredLanguage: user.PreferredLanguage,
|
PreferredLanguage: user.PreferredLanguage,
|
||||||
CreatedAt: user.CreatedAt,
|
CreatedAt: user.CreatedAt,
|
||||||
UpdatedAt: user.UpdatedAt,
|
UpdatedAt: user.UpdatedAt,
|
||||||
|
|
@ -1858,9 +1862,10 @@ func (h *Handler) GetUserByID(c *fiber.Ctx) error {
|
||||||
EmailVerified: user.EmailVerified,
|
EmailVerified: user.EmailVerified,
|
||||||
PhoneVerified: user.PhoneVerified,
|
PhoneVerified: user.PhoneVerified,
|
||||||
Status: user.Status,
|
Status: user.Status,
|
||||||
LastLogin: lastLogin,
|
LastLogin: lastLogin,
|
||||||
ProfileCompleted: user.ProfileCompleted,
|
ProfileCompleted: user.ProfileCompleted,
|
||||||
ProfilePictureURL: user.ProfilePictureURL,
|
ProfileCompletionPercentage: user.ProfileCompletionPercentage,
|
||||||
|
ProfilePictureURL: user.ProfilePictureURL,
|
||||||
PreferredLanguage: user.PreferredLanguage,
|
PreferredLanguage: user.PreferredLanguage,
|
||||||
CreatedAt: user.CreatedAt,
|
CreatedAt: user.CreatedAt,
|
||||||
UpdatedAt: user.UpdatedAt,
|
UpdatedAt: user.UpdatedAt,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user