fix(user): correct placement of DeepCopy for user info update logic
This commit is contained in:
parent
0199dc7fa2
commit
6460f2f2e1
@ -39,7 +39,6 @@ func (l *UpdateUserBasicInfoLogic) UpdateUserBasicInfo(req *types.UpdateUserBasi
|
|||||||
|
|
||||||
isDemo := strings.ToLower(os.Getenv("PPANEL_MODE")) == "demo"
|
isDemo := strings.ToLower(os.Getenv("PPANEL_MODE")) == "demo"
|
||||||
|
|
||||||
tool.DeepCopy(userInfo, req)
|
|
||||||
if req.Avatar != "" && !tool.IsValidImageSize(req.Avatar, 1024) {
|
if req.Avatar != "" && !tool.IsValidImageSize(req.Avatar, 1024) {
|
||||||
return errors.Wrapf(xerr.NewErrCode(xerr.ERROR), "Invalid Image Size")
|
return errors.Wrapf(xerr.NewErrCode(xerr.ERROR), "Invalid Image Size")
|
||||||
}
|
}
|
||||||
@ -121,7 +120,7 @@ func (l *UpdateUserBasicInfoLogic) UpdateUserBasicInfo(req *types.UpdateUserBasi
|
|||||||
}
|
}
|
||||||
userInfo.Commission = req.Commission
|
userInfo.Commission = req.Commission
|
||||||
}
|
}
|
||||||
|
tool.DeepCopy(userInfo, req)
|
||||||
userInfo.OnlyFirstPurchase = &req.OnlyFirstPurchase
|
userInfo.OnlyFirstPurchase = &req.OnlyFirstPurchase
|
||||||
userInfo.ReferralPercentage = req.ReferralPercentage
|
userInfo.ReferralPercentage = req.ReferralPercentage
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user