crocodile
crocodile copied to clipboard
修改通知信息会报“参数错误”
What Version Of crocodile you using
1.1.7
Describe your issue
在个人中心模块,我添加通知的钉钉号,会报参数错误,调用的具体接口是
/api/v1/user/info
,请求的具体参数:{"id":"1112222","email":"","wechat":"","dingphone":"188xxxxxxxx","slack":"","telegram":"","password":"","remark":""}
报错日志:
2020-11-23T11:38:55.493+0800 error user/user.go:170 ShouldBindJSON failed {"error": "Key: 'ChangeUserSelf.Name' Error:Field validation for 'Name' failed on the 'required' tag"}
在有uid
的情况下,name应该是非必须项,所以应该去掉: