Update User
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user