fix🐛: 用户修改头像接口入参模型分离(#468)

This commit is contained in:
zhangwenjian committed 2021-06-30 18:55:16 +08:00
1 parent 862f24d8a7
commit f4396e7e83
3 files changed
+43 -2

No files matched your search

+2 -2
View File
@@ -208,7 +208,7 @@ func (e SysUser) Delete(c *gin.Context) {
// @Security Bearer
func (e SysUser) InsetAvatar(c *gin.Context) {
s := service.SysUser{}
req := dto.SysUserControl{}
req := dto.UpdateSysUserAvatarReq{}
err := e.MakeContext(c).
MakeOrm().
MakeService(&s.Service).
@@ -237,7 +237,7 @@ func (e SysUser) InsetAvatar(c *gin.Context) {
req.UserId = p.UserId
req.Avatar = "/" + filPath
err = s.Update(&req, p)
err = s.UpdateSysUserAvatar(&req, p)
if err != nil {
e.Logger.Error(err)
return