fix update karyawan

This commit is contained in:
ferdiansyah783
2024-08-27 23:59:25 +07:00
parent aae740c77f
commit cfb986b2d2
3 changed files with 11 additions and 8 deletions
+7 -7
View File
@@ -118,14 +118,14 @@ func (s *UserService) Update(ctx mycontext.Context, id int64, userReq *entity.Us
}
//if changed branch
if userReq.PartnerID != nil {
branch, err := s.branchRepo.GetBranchByID(ctx, *userReq.PartnerID)
if err != nil {
return nil, err
}
// if userReq.PartnerID != nil {
// branch, err := s.branchRepo.GetBranchByID(ctx, *userReq.PartnerID)
// if err != nil {
// return nil, err
// }
existingUser.PartnerName = branch.Name
}
// existingUser.PartnerName = branch.Name
// }
err = existingUser.ToUpdatedUser(*userReq)
if err != nil {