Update User

This commit is contained in:
aditya.siregar
2024-08-30 13:25:02 +07:00
parent 80ee503798
commit 0ad171f979
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -28,7 +28,7 @@ func (e *User) Validate() error {
return nil
}
func (u *User) ToEntity(ctx mycontext.Context) *entity.User {
func (u *User) ToEntity(ctx mycontext.Context, userType string) *entity.User {
if !ctx.IsAdmin() {
u.PartnerID = ctx.GetPartnerID()
}
@@ -41,7 +41,7 @@ func (u *User) ToEntity(ctx mycontext.Context) *entity.User {
PartnerID: u.PartnerID,
SiteID: u.SiteID,
NIK: u.NIK,
UserType: "CUSTOMER",
UserType: userType,
PhoneNumber: u.PhoneNumber,
}
}